// MACRO-START * MACRO-START * MACRO-START * MACRO-START * MACRO-START * MACRO-START *
// a detailed explanation how these macros work is given in this tutorial
// https://forum.arduino.cc/t/comfortable-serial-debug-output-short-to-write-fixed-text-name-and-content-of-any-variable-code-example/888298
#define dbg(myFixedText, variableName) \
Serial.print( F(#myFixedText " " #variableName"=") ); \
Serial.println(variableName);
// MACRO-END * MACRO-END * MACRO-END * MACRO-END * MACRO-END * MACRO-END * MACRO-END *
const unsigned long SECOND = 1000;
//const unsigned long HOUR = 3600SECOND;
//const unsigned int minuto = SECOND60; /
const unsigned long HOUR = 3600 * SECOND; // NOT 3600SECOND
const unsigned int minuto = SECOND * 60; // NOT SECOND60
const unsigned int hora = minuto * 60;
unsigned long horas = 2UL * HOUR;
void setup() {
Serial.begin(115200);
Serial.println("Setup-Start");
dbg("1",SECOND);
dbg("2",HOUR);
dbg("3",minuto);
dbg("4",hora);
dbg("5",horas);
dbg("6",2UL * HOUR);
}
void loop() {
//for(unsigned long h=horas;h>0;h-=1000)
//delay(1000);
delay(2UL*HOUR); // Not working, delay only 7 minutes
}