Hello David
… just a question of RIGOR …
You was absolutely RIGHT in your diagnostic
I thank you for the time and the advises you gave me during all the previous month, when I asked many questions about “INSTABILITY of MY POKA YOKE”
At the end, I decided to start the cleaning-up of my software …
· DOWLOAD the last version of Arduino 1.8.8
· CHOOSE strictly the libraries I needed and DOWNLOAD the latest version
· INCLUDE the exact libraries needed by the functions of the software
· DEFINE precisely each constant, and variable by subprogram
· ADJUST the format of each variable to the need (uint8_t, uint16_t, char, String, …)
· AVOID confusion between acronyms : Unfortunatly, I used “ts”
o struct ts t DS3231
o TouchScreen ts = TouchScreen(XP,YP,XM,YM)
· UNDERSTAND perfectly how works the functions used in a library
o tft.width() and tft.height() are general dimension of the screen
o I just needed width_fix=320 and height_fix=480
· INITIALIZATION of variables in SET-UP only (not in DEFINITION)
· LOOP : main structure based on calling the main subprogram
· WRITE comments and history in a separate file
o I reduced the software from 5031 lines before to 3747 lines after
· GROUP the subprograms by function (SD card, clock DS3231, …)
· KEEP in comments only the main revisions (not the history)
· GIVE the maximum of readability at each line and each subprogram
I realized systematic and comparative tests:
· I splitted the program in 10 chapters of 5 subprogram per chapter
· I re-wrote the “include/define/set-up/loop” to make the chapter work autonomously
· I tested everytime on the both electronic configurations:
o old TouchScreen 0x6814 (RM68140) which works
o new TouchScreen 0x0099 (HX8357-D, ili 9488) which blinks
Finally, I didn’t find THE root cause, but I corrected a multitude of small mistakes by application of the principles written on the top. I didn’t manage to isolate the dust which stops the program.
Best Regards
Thank you for your patience and your time