@mfalkvidd said:
Uncomment
Serial.println(tripped);
and you'll probably see what is wrong. The print statements are there to help you debug :)
Hehe, yes you are right. The problem is the size of my sketch. It's really on the limit, if I just uncomment 1 print statement the sketch is too big. :sweat: So I have to comment out or remove something else in order to uncomment something. :relaxed:
@BartE said:
@Aloha with this statement on line 120: lastMillis = millis();
You try to put an "unsigned long" (16 bits) in to an integer (8bits)
this will change also the next variable in your case "bool lastTripped"
Try to change line 71:
int lastMillis;
into
unsigned long lastMillis;
Wow, I'm impressed you saw that!
It's actually working now. :ok_hand:
With one less thing to worry about I might get some good sleep tonight. Thanks! :smile: