I have take a look at millis() but i'm so newbee i'm not understanding >:(
I have make my fonction and my need under ardublock first and after with blockly@rduino...
in my my is so simple ! in blockly too... but impossible to translate in fonctionnal code
the use of milis() is like a loop is that ? so arduino make the test if elappsed x mils but make also other test ?
Is a sort of multitrading ?
So the awnser to my question is no ?
Is totally impossible to stop a fonction with different actions and delay() inside when one pin goes high without use of interruption ?
Is totally impossible to stop a fonction with different actions and delay() inside when one pin goes high without use of interruption ?
During delay(), the switch is not being read, so it might as well not exist.
If you don't re-write the code to eliminate the blocking, then it is impossible to change actions with, or without, interrupts.
Imagine I called you, and said "meet me at our favorite watering hole, in 30 minutes, and I'll buy you a beer". Now, you live 5 minutes away. What you could do is run down to the bar, and then just sit there and wait for me, or, you could periodically check to see if it is time to leave. Meanwhile, you could be doing other things, like laundry, eating dinner, mowing the grass, etc.
You have to decide whether leaving code in it's current state, with blocking code, or totally rewriting it to not be blocking, is preferred.