Code is located here: https://create.arduino.cc/projecthub/Sergey_Urusov/arduino-mega-chess-ii-b2e599
Display I'm using: https://www.ebay.com/itm/264583550286
MEGA2560 pin diagram: https://aws1.discourse-cdn.com/ardu.../368f6a73141b26b82227ae7794cc6920d402a618.png
So, I'm trying to migrate this code from the Mega to the Teensy. On the Mega it runs as-is with the display without any changes. just snap the display onto the Mega like it was designed, and everything just magically works "out of the box". Yay for that at least.
No so with the Teensy. The code compiles and uploads ok (There are "warnings" but no "errors" so I would hope it's ok?) I was able to map the pins 1-1:
LCD : MEGA : Teensy
--------------------------------
LCD_RD : A0 : 14
LCD_WR : A1 : 15
LCD_RS : A2 : 16
LCD_CS : A3 : 17
LCD_RST : A4 : 18
F_CS : A5 : 19
SD_SCK : 13 : 13
SD_D0 : 12 : 12
SD_DI : 11 : 11
SD_SS : 10 : 10
LCD_D1 : 9 : 9
LCD_D0 : 8 : 8
LCD_D7 : 7 : 7
LCD_D6 : 6 : 6
LCD_D5 : 5 : 5
LCD_D4 : 4 : 4
LCD_D3 : 3 : 3
LCD_D2 : 2 : 2
On the Teensy 4.0 pin diagram, pins 14-19 are also named A0-A5 so I was hoping it'd "just work".
I'm supplying the LCD's 3.3V from the Teensy's 3.3V out, and the LCD's 5V from the same source providing 5V to the Teensy VIN (it's actually like 4.77V).
Not sure what the problem is, but my first hunch is that even though the Teensy has the same pins, I might need to fiddle with pinmodes to get them to behave the way I want them too. Thing is, I'm not intimately familiar with the code or this display to even know which are input and which are output pins (it's a touchscreen, so some are output for that at least)
Second guess is a power issue...? Maybe 4.77V isn't close enough to 5V? Or maybe the Teensy's 250mA of 3.3V isn't enough? I would figure since the display has both 5V in and 3.3V in that the 5V is the primary power needing most the amps, and then the 3.3V is just as a digital reference...?
Too much of a newbie to know for sure, so I could use some guidance. Thanks!
Finally, the warnings I get when I compile for the Teensy (in case someone asks for it):
Someone else mentioned concern about these warnings in particular:
Display I'm using: https://www.ebay.com/itm/264583550286
MEGA2560 pin diagram: https://aws1.discourse-cdn.com/ardu.../368f6a73141b26b82227ae7794cc6920d402a618.png
So, I'm trying to migrate this code from the Mega to the Teensy. On the Mega it runs as-is with the display without any changes. just snap the display onto the Mega like it was designed, and everything just magically works "out of the box". Yay for that at least.
No so with the Teensy. The code compiles and uploads ok (There are "warnings" but no "errors" so I would hope it's ok?) I was able to map the pins 1-1:
LCD : MEGA : Teensy
--------------------------------
LCD_RD : A0 : 14
LCD_WR : A1 : 15
LCD_RS : A2 : 16
LCD_CS : A3 : 17
LCD_RST : A4 : 18
F_CS : A5 : 19
SD_SCK : 13 : 13
SD_D0 : 12 : 12
SD_DI : 11 : 11
SD_SS : 10 : 10
LCD_D1 : 9 : 9
LCD_D0 : 8 : 8
LCD_D7 : 7 : 7
LCD_D6 : 6 : 6
LCD_D5 : 5 : 5
LCD_D4 : 4 : 4
LCD_D3 : 3 : 3
LCD_D2 : 2 : 2
On the Teensy 4.0 pin diagram, pins 14-19 are also named A0-A5 so I was hoping it'd "just work".
I'm supplying the LCD's 3.3V from the Teensy's 3.3V out, and the LCD's 5V from the same source providing 5V to the Teensy VIN (it's actually like 4.77V).
Not sure what the problem is, but my first hunch is that even though the Teensy has the same pins, I might need to fiddle with pinmodes to get them to behave the way I want them too. Thing is, I'm not intimately familiar with the code or this display to even know which are input and which are output pins (it's a touchscreen, so some are output for that at least)
Second guess is a power issue...? Maybe 4.77V isn't close enough to 5V? Or maybe the Teensy's 250mA of 3.3V isn't enough? I would figure since the display has both 5V in and 3.3V in that the 5V is the primary power needing most the amps, and then the 3.3V is just as a digital reference...?
Too much of a newbie to know for sure, so I could use some guidance. Thanks!
Finally, the warnings I get when I compile for the Teensy (in case someone asks for it):
Code:
In file included from C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\gui.h:6:0,
from C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:68:
c:\Users\scott\OneDrive\Documents\Arduino\libraries\MCUFRIEND_kbv/UTFTGLUE.h:17:2: warning: #warning @@@@@@@@@@@@@@@@@@@@@@@@@ <UTFTGLUE.h> @@@@@@@@@@@@@@@@@@@@@@@@@@ [-Wcpp]
#warning @@@@@@@@@@@@@@@@@@@@@@@@@ <UTFTGLUE.h> @@@@@@@@@@@@@@@@@@@@@@@@@@
^
In file included from C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:4:0:
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\logic.h:63:1: warning: narrowing conversion of '-4' from 'int' to 'char' inside { } [-Wnarrowing]
};
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\logic.h:63:1: warning: narrowing conversion of '-2' from 'int' to 'char' inside { } [-Wnarrowing]
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\logic.h:63:1: warning: narrowing conversion of '-3' from 'int' to 'char' inside { } [-Wnarrowing]
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\logic.h:63:1: warning: narrowing conversion of '-5' from 'int' to 'char' inside { } [-Wnarrowing]
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\logic.h:63:1: warning: narrowing conversion of '-6' from 'int' to 'char' inside { } [-Wnarrowing]
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\logic.h:63:1: warning: narrowing conversion of '-3' from 'int' to 'char' inside { } [-Wnarrowing]
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\logic.h:63:1: warning: narrowing conversion of '-2' from 'int' to 'char' inside { } [-Wnarrowing]
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\logic.h:63:1: warning: narrowing conversion of '-4' from 'int' to 'char' inside { } [-Wnarrowing]
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\logic.h:63:1: warning: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\logic.h:63:1: warning: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\logic.h:63:1: warning: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\logic.h:63:1: warning: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\logic.h:63:1: warning: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\logic.h:63:1: warning: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\logic.h:63:1: warning: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\logic.h:63:1: warning: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
In file included from C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:68:0:
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\gui.h: In function 'void status_step(char, byte, uint16_t)':
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\gui.h:521:17: warning: array subscript has type 'char' [-Wchar-subscripts]
int i=column[c]-1;
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\gui.h:522:16: warning: array subscript has type 'char' [-Wchar-subscripts]
int j=8-row[c];
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino: In function 'boolean fenload(String)':
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:120:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int c=0; c<ss.length(); c++) {
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino: In function 'void movepos(int, step_t&)':
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:349:42: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (column[s.c2]>1&&pole[s.c2-1]==-fp||column[s.c2]<8&&pole[s.c2+1]==-fp) pos[l+1].pp=s.c1-8;
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:366:23: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (column[s.c2]>1&&pole[s.c2-1]==fp||column[s.c2]<8&&pole[s.c2+1]==fp) pos[l+1].pp=s.c1+8;
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:369:27: warning: comparison of constant '3' with boolean expression is always false [-Wbool-compare]
if ((s.typecheck&&B111)>3) pos[l+1].weight_b+=fig_weight[(s.typecheck&B111)-2]-100;
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino: In function 'void add_king(int, int)':
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:471:20: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (f2==0||f2<0&&f1>0||f2>0&&f1<0) {
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:471:32: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (f2==0||f2<0&&f1>0||f2>0&&f1<0) {
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino: In function 'void add_knight(int, int)':
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:489:20: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (f2==0||f2<0&&f1>0||f2>0&&f1<0) {
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:489:32: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (f2==0||f2<0&&f1>0||f2>0&&f1<0) {
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino: In function 'void add_stra(int, int)':
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:509:21: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (f2==0||f2<0&&f1>0||f2>0&&f1<0) {
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:509:33: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (f2==0||f2<0&&f1>0||f2>0&&f1<0) {
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino: In function 'void add_diag(int, int)':
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:531:21: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (f2==0||f2<0&&f1>0||f2>0&&f1<0) {
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:531:33: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (f2==0||f2<0&&f1>0||f2>0&&f1<0) {
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino: In function 'void generate_steps(int)':
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:592:16: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (f==0||f<0&&pos[l].w||f>0&&!pos[l].w) continue;
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:592:31: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (f==0||f<0&&pos[l].w||f>0&&!pos[l].w) continue;
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:605:17: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (f==0||f<0&&pos[l].w||f>0&&!pos[l].w) continue;
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:605:32: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (f==0||f<0&&pos[l].w||f>0&&!pos[l].w) continue;
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino: In function 'int active(step_t&)':
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:810:24: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (column[s.c2]>1&&posbk==s.c2-9||column[s.c2]<8&&posbk==s.c2-7) return 1; //check by pawn
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:814:24: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (column[s.c2]>1&&poswk==s.c2+7||column[s.c2]<8&&posbk==s.c2+9) return 1; //check by pawn
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino: In function 'boolean is_draw()':
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:1034:8: warning: unused variable 'repeats' [-Wunused-variable]
int repeats=0;
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:1023:8: warning: variable 'poleb' set but not used [-Wunused-but-set-variable]
char poleb[64]; //
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino: In function 'int solve()':
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:1095:42: warning: array subscript has type 'char' [-Wchar-subscripts]
pos[0].weight_w+=fig_weight[pole[i]]; //full start weight 8000
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:1128:6: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
if (legal==0)
^
In file included from C:\Users\scott\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.56.1\cores\teensy4/WProgram.h:41:0,
from C:\Users\scott\AppData\Local\Temp\arduino-sketch-6C9736ADEAE2791D10573918D9EEEF69\pch\Arduino.h:6:
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino: In function 'void wactest()':
C:\Users\scott\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.56.1\cores\teensy4/avr/pgmspace.h:109:2: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
})
^
C:\Users\scott\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.56.1\cores\teensy4/avr/pgmspace.h:60:45: note: in definition of macro 'strcpy_P'
#define strcpy_P(dest, src) strcpy((dest), (src))
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:1213:24: note: in expansion of macro 'pgm_read_word'
strcpy_P(w, (char*)pgm_read_word(&wacs[i-1]));
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino: In function 'void show_status()':
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:1237:12: warning: unused variable 'c' [-Wunused-variable]
uint16_t c=GRAY;
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino: In function 'void check_gameend()':
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:1266:14: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
else if (generate_legal()==0)
^
In file included from C:\Users\scott\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.56.1\cores\teensy4/WProgram.h:41:0,
from C:\Users\scott\AppData\Local\Temp\arduino-sketch-6C9736ADEAE2791D10573918D9EEEF69\pch\Arduino.h:6:
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino: In function 'void gui()':
C:\Users\scott\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.56.1\cores\teensy4/avr/pgmspace.h:109:2: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
})
^
C:\Users\scott\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.56.1\cores\teensy4/avr/pgmspace.h:60:45: note: in definition of macro 'strcpy_P'
#define strcpy_P(dest, src) strcpy((dest), (src))
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:1333:30: note: in expansion of macro 'pgm_read_word'
strcpy_P(w, (char*)pgm_read_word(&wacs[n-1]));
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:1507:15: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (pos[0].w&&autow||!pos[0].w&&autob) {
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino: In function 'int solve()':
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:1185:4: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Wstrict-overflow]
if (score>=BETA) { out++; BETA=20000; }
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:1186:4: warning: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Wstrict-overflow]
if (score<=ALPHA) { out++; ALPHA=-20000; }
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:1189:42: warning: 'best.step_t::typecheck' may be used uninitialized in this function [-Wmaybe-uninitialized]
&&best.c2==steps[pos[0].b_step].c2&&best.typecheck==steps[pos[0].b_step].typecheck) {
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:1189:8: warning: 'best.step_t::c2' may be used uninitialized in this function [-Wmaybe-uninitialized]
&&best.c2==steps[pos[0].b_step].c2&&best.typecheck==steps[pos[0].b_step].typecheck) {
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:1188:40: warning: 'best.step_t::c1' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (best.f1==steps[pos[0].b_step].f1&&best.c1==steps[pos[0].b_step].c1
^
In file included from c:\Users\scott\OneDrive\Documents\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:35:0:
c:\Users\scott\OneDrive\Documents\Arduino\libraries\MCUFRIEND_kbv\utility/mcufriend_shield.h:504:2: warning: #warning regular UNO shield on a Teensy 4.0 [-Wcpp]
#warning regular UNO shield on a Teensy 4.0
^
c:\Users\scott\OneDrive\Documents\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp: In member function 'uint16_t MCUFRIEND_kbv::readReg(uint16_t, int8_t)':
c:\Users\scott\OneDrive\Documents\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:162:13: warning: unused variable 'lo' [-Wunused-variable]
uint8_t lo;
^
c:\Users\scott\OneDrive\Documents\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp: In member function 'uint16_t MCUFRIEND_kbv::readID()':
c:\Users\scott\OneDrive\Documents\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:194:19: warning: unused variable 'ret2' [-Wunused-variable]
uint16_t ret, ret2;
^
c:\Users\scott\OneDrive\Documents\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp: In member function 'int16_t MCUFRIEND_kbv::readGRAM(int16_t, int16_t, uint16_t*, int16_t, int16_t)':
c:\Users\scott\OneDrive\Documents\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:294:22: warning: unused variable 'tmp' [-Wunused-variable]
uint8_t r, g, b, tmp;
^
c:\Users\scott\OneDrive\Documents\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp: In member function 'virtual void MCUFRIEND_kbv::setRotation(uint8_t)':
c:\Users\scott\OneDrive\Documents\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:355:29: warning: unused variable 'REV' [-Wunused-variable]
uint16_t GS, SS_v, ORG, REV = _lcd_rev;
^
c:\Users\scott\OneDrive\Documents\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp: In member function 'void MCUFRIEND_kbv::begin(uint16_t)':
c:\Users\scott\OneDrive\Documents\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:1584:31: warning: unused variable 'ST7781_regValues' [-Wunused-variable]
static const uint16_t ST7781_regValues[] PROGMEM = {
^
c:\Users\scott\OneDrive\Documents\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:1684:30: warning: unused variable 'ST7789_regValues_arcain6' [-Wunused-variable]
static const uint8_t ST7789_regValues_arcain6[] PROGMEM = {
^
c:\Users\scott\OneDrive\Documents\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:2595:30: warning: unused variable 'ILI9341_regValues_ada' [-Wunused-variable]
static const uint8_t ILI9341_regValues_ada[] PROGMEM = { // Adafruit_TFTLCD only works with EXTC=0
^
c:\Users\scott\OneDrive\Documents\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:2675:30: warning: unused variable 'ILI9481_CPT29_regValues' [-Wunused-variable]
static const uint8_t ILI9481_CPT29_regValues[] PROGMEM = { // 320x430
^
c:\Users\scott\OneDrive\Documents\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:2687:30: warning: unused variable 'ILI9481_PVI35_regValues' [-Wunused-variable]
static const uint8_t ILI9481_PVI35_regValues[] PROGMEM = { // 320x480
^
c:\Users\scott\OneDrive\Documents\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:2699:30: warning: unused variable 'ILI9481_AUO317_regValues' [-Wunused-variable]
static const uint8_t ILI9481_AUO317_regValues[] PROGMEM = { // 320x480
^
c:\Users\scott\OneDrive\Documents\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:2710:30: warning: unused variable 'ILI9481_CMO35_regValues' [-Wunused-variable]
static const uint8_t ILI9481_CMO35_regValues[] PROGMEM = { // 320480
^
c:\Users\scott\OneDrive\Documents\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:2724:30: warning: unused variable 'ILI9481_RGB_regValues' [-Wunused-variable]
static const uint8_t ILI9481_RGB_regValues[] PROGMEM = { // 320x480
^
c:\Users\scott\OneDrive\Documents\Arduino\libraries\MCUFRIEND_kbv\MCUFRIEND_kbv.cpp:2816:7: warning: label 'common_9488' defined but not used [-Wunused-label]
common_9488:
^
Opening Teensy Loader...
teensy_size: Memory Usage on Teensy 4.0:
teensy_size: FLASH: code:68692, data:43684, headers:8452 free for files:1910788
teensy_size: RAM1: variables:15936, code:66984, padding:31320 free for local variables:410048
teensy_size: RAM2: variables:12384 free for malloc/new:511904
--------------------------
Compilation complete.
Teensy did not respond to a USB-based request to enter program mode.
Please press the PROGRAM MODE BUTTON on your Teensy to upload your sketch.
--------------------------
upload complete.
Someone else mentioned concern about these warnings in particular:
Code:
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino: In function 'void wactest()':
C:\Users\scott\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.56.1\cores\teensy4/avr/pgmspace.h:109:2: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
})
^
C:\Users\scott\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.56.1\cores\teensy4/avr/pgmspace.h:60:45: note: in definition of macro 'strcpy_P'
#define strcpy_P(dest, src) strcpy((dest), (src))
^
C:\Users\scott\OneDrive\Documents\Arduino\arduinomegachess2\arduinomegachess2.ino:1213:24: note: in expansion of macro 'pgm_read_word'
strcpy_P(w, (char*)pgm_read_word(&wacs[i-1]));
^