Skip to content

Commit 941cff4

Browse files
committed
LCD test 2
1 parent 4ebb1fa commit 941cff4

File tree

11 files changed

+79
-7
lines changed

11 files changed

+79
-7
lines changed

.github/workflows/run-cl-arduino.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,29 @@ jobs:
3535
run: |
3636
# eg: echo "<path>,<fqbn>" >> ignore.list
3737
38+
# no Seeed_FS.h so can't compile
39+
echo "SmoothFonts,Seeeduino:samd:seeed_XIAO_m0" >> ignore.list
40+
echo "SmoothFonts,Seeeduino:nrf52:xiaonRF52840" >> ignore.list
41+
echo "SmoothFonts,Seeeduino:nrf52:xiaonRF52840Sense" >> ignore.list
42+
echo "SmoothFonts,Seeeduino:renesas_uno:XIAO_RA4M1" >> ignore.list
43+
echo "SmoothFonts,rp2040:rp2040:seeed_xiao_rp2040" >> ignore.list
44+
echo "SmoothFonts,rp2040:rp2040:seeed_xiao_rp2350" >> ignore.list
45+
echo "SmoothFonts,esp32:esp32:XIAO_ESP32C3" >> ignore.list
46+
echo "SmoothFonts,esp32:esp32:XIAO_ESP32C6" >> ignore.list
47+
echo "SmoothFonts,esp32:esp32:XIAO_ESP32S3" >> ignore.list
48+
49+
echo "480x320/Touch_Controller_Demo,Seeeduino:samd:seeed_XIAO_m0" >> ignore.list
50+
echo "480x320/Touch_Controller_Demo,Seeeduino:nrf52:xiaonRF52840" >> ignore.list
51+
echo "480x320/Touch_Controller_Demo,Seeeduino:nrf52:xiaonRF52840Sense" >> ignore.list
52+
echo "480x320/Touch_Controller_Demo,Seeeduino:renesas_uno:XIAO_RA4M1" >> ignore.list
53+
echo "480x320/Touch_Controller_Demo,rp2040:rp2040:seeed_xiao_rp2040" >> ignore.list
54+
echo "480x320/Touch_Controller_Demo,rp2040:rp2040:seeed_xiao_rp2350" >> ignore.list
55+
echo "480x320/Touch_Controller_Demo,esp32:esp32:XIAO_ESP32C3" >> ignore.list
56+
echo "480x320/Touch_Controller_Demo,esp32:esp32:XIAO_ESP32C6" >> ignore.list
57+
echo "480x320/Touch_Controller_Demo,esp32:esp32:XIAO_ESP32S3" >> ignore.list
58+
59+
60+
3861
3962
- name: Build sketch
4063
run: |

User_Setup.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,14 +193,14 @@
193193
//
194194
// ##################################################################################
195195

196-
// #define TOUCH
196+
#define TOUCH
197197

198198
//for four wire touch
199-
//#define FOURWIRETOUCH
200-
//#define YP A2 // must be an analog pin, use "An" notation!
201-
//#define XM A1 // must be an analog pin, use "An" notation!
202-
//#define XP A3 // can be a digital pin,
203-
199+
#define FOURWIRETOUCH
200+
#define YP A2 // must be an analog pin, use "An" notation!
201+
#define XM A1 // must be an analog pin, use "An" notation!
202+
#define XP A3 // can be a digital pin,
203+
#define YM A0
204204
//for adx
205205

206206
// #define XPT2046TOUCH
@@ -232,7 +232,7 @@
232232

233233
// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded
234234
// this will save ~20kbytes of FLASH
235-
//#define SMOOTH_FONT
235+
// #define SMOOTH_FONT
236236

237237
// ##################################################################################
238238
//

examples/160x128/TFT_Meter_5/TFT_Meter_5.ino

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ int value[6] = {0, 0, 0, 0, 0, 0};
2828
int old_value[6] = { -1, -1, -1, -1, -1, -1};
2929
int d = 0;
3030

31+
32+
#if defined(NRF52840_XXAA)
33+
char *dtostrf(double val, int width, int prec, char *s) {
34+
sprintf(s, "%*.*f", width, prec, val);
35+
return s;
36+
}
37+
#endif
38+
39+
3140
void setup(void) {
3241
Serial.begin(57600); // For debug
3342
tft.init();

examples/320x240/TFT_ArcFill/TFT_ArcFill.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ int fillArc(int x, int y, int start_angle, int seg_count, int rx, int ry, int w,
9696
x1 = x3;
9797
y1 = y3;
9898
}
99+
return 0;
99100
}
100101

101102
// #########################################################################

examples/320x240/TFT_FillArcSpiral/TFT_FillArcSpiral.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ int fillArc(int x, int y, int start_angle, int seg_count, int rx, int ry, int w,
8484
tft.fillTriangle(x0, y0, x1, y1, x2, y2, colour);
8585
tft.fillTriangle(x1, y1, x2, y2, x3, y3, colour);
8686
}
87+
return 0;
8788
}
8889

8990
// #########################################################################

examples/320x240/TFT_Float_Test/TFT_Float_Test.ino

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ TFT_eSPI tft = TFT_eSPI(); // Invoke custom library
3737

3838
unsigned long drawTime = 0;
3939

40+
#if defined(NRF52840_XXAA)
41+
char *dtostrf(double val, int width, int prec, char *s) {
42+
sprintf(s, "%*.*f", width, prec, val);
43+
return s;
44+
}
45+
#endif
46+
47+
4048
void setup(void) {
4149
Serial.begin(115200);
4250
tft.init();

examples/320x240/TFT_Meter_linear/TFT_Meter_linear.ino

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ int value[6] = {0, 0, 0, 0, 0, 0};
3333
int old_value[6] = { -1, -1, -1, -1, -1, -1};
3434
int d = 0;
3535

36+
#if defined(NRF52840_XXAA)
37+
char *dtostrf(double val, int width, int prec, char *s) {
38+
sprintf(s, "%*.*f", width, prec, val);
39+
return s;
40+
}
41+
#endif
42+
43+
3644
void setup(void) {
3745
tft.init();
3846
tft.setRotation(1);

examples/320x240/TFT_Meters/TFT_Meters.ino

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ int value[6] = {0, 0, 0, 0, 0, 0};
3131
int old_value[6] = { -1, -1, -1, -1, -1, -1};
3232
int d = 0;
3333

34+
#if defined(NRF52840_XXAA)
35+
char *dtostrf(double val, int width, int prec, char *s) {
36+
sprintf(s, "%*.*f", width, prec, val);
37+
return s;
38+
}
39+
#endif
40+
3441
void setup(void) {
3542
tft.init();
3643
tft.setRotation(0);

examples/320x240/TFT_Pie_Chart/TFT_Pie_Chart.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ int fillSegment(int x, int y, int start_angle, int sub_angle, int r, unsigned in
6565
x1 = x2;
6666
y1 = y2;
6767
}
68+
return 0;
6869
}
6970

7071

examples/480x320/TFT_Meter_4/TFT_Meter_4.ino

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ int value[6] = {0, 0, 0, 0, 0, 0};
3535
int old_value[6] = { -1, -1, -1, -1, -1, -1};
3636
int d = 0;
3737

38+
#if defined(NRF52840_XXAA)
39+
char *dtostrf(double val, int width, int prec, char *s) {
40+
sprintf(s, "%*.*f", width, prec, val);
41+
return s;
42+
}
43+
#endif
44+
3845
void setup(void) {
3946
tft.init();
4047
tft.setRotation(1);

examples/480x320/TFT_Meters/TFT_Meters.ino

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ int value[6] = {0, 0, 0, 0, 0, 0};
3030
int old_value[6] = { -1, -1, -1, -1, -1, -1};
3131
int d = 0;
3232

33+
#if defined(NRF52840_XXAA)
34+
char *dtostrf(double val, int width, int prec, char *s) {
35+
sprintf(s, "%*.*f", width, prec, val);
36+
return s;
37+
}
38+
#endif
39+
3340
void setup(void) {
3441
tft.init();
3542
tft.setRotation(1);

0 commit comments

Comments
 (0)