I’m no C++ language expert, but I’ve seen it said that declared like that it will be set to zero, and in fact I had to deliberately prevent that from happening to something once by addingCiceron wrote: Fri Sep 29, 2023 12:00 amI'll try to add it this evening.ag123 wrote: Thu Sep 28, 2023 6:15 am in setup() addyou forgot to initialize the variable. And use \[code\] blocks to enclose the code in posts here, that makes it much more readable.Code: Select all
timer = millis();
(global) variables that are uninitialised takes an undefined value, not necessary 0 (zero). imagine that it is 0xffffff, then that loop is never run.
however, I thought it was enough -
unsigned long timer;
in the variables section
Edit:did not work
Code: Select all
__attribute__ ((section (".noinit")))
It sounds like you are making some progress though.