Hi, I have made a chronometer, but there is two weird things.
The first is that I need to put an instruction before another else I will get an error (the other function placed in other position work).
void menuChangeEvent(MenuChangeEvent changed){
delay(0);
menuPrint(changed.to.getName());
}
delay(0) is the function added, else the compiler give error on menuPrint.
The second is totally weird, on the function
void doClearT(){
while (digitalRead(pinButton2)==HIGH) delay(10);//wait until select is realeased
lcd.setCursor(0,1);
lcd.print("CAN+ACT per eseguire");
while ((digitalRead(pinButton1)==LOW)&&!((digitalRead(pinButton2)==HIGH)&&(digitalRead(pinButton3)==HIGH)));
if ((digitalRead(pinButton2)==HIGH)&&(digitalRead(pinButton3)==HIGH)){
timesCount=0;
storage.time[0]=0;
lcd.setCursor(0,1);
lcd.print("Tempi cancellati ");
}
while (digitalRead(pinButton1)==LOW) delay(10);//select to exit
}
if I comment the rows with "lcd." the serial port function, else the serial port does not initialize and the software hung of first Serial.println().
I have used in many other parts of the program "lcd." but only that function cause the error on serial port.
The program begin with
void setup() {
Serial.begin(9600);
Serial.println("Test");
It hungs on print of "Test" and no feedback on serial monitor.
What happens?
JJ