This is what i need to do:
im working with 15 valves and i need to follow a procedure, for instance:
1-step (time 0-30min): V1=V2=ON.
2-step … if (step 1 is done) : V1=OFF V5=ON (during 2 hours)
… nad it goes on for another 16 steps
So i need follow a process for 6 hours but it has small processes that need to be time. I have been trying to work with the TimerObject library but i just don’t know how to conditioning the “callbacks”. I have tried to use millis() , no luck . Im just very new at programming… so please HELP
I have tried to use millis() , no luck .
Programming is NOT a matter of luck. It IS a matter of logic.
You wrote some code. You didn't post it.
It did something. You didn't say what.
You wanted it to do something. You didn't say what.
so please HELP
The standard Arduino delay() function can be used for delays of more than 1000 hours. If you need more, then just delay() again. However it does lock up the Arduino to be totally non-functional for that duration. Depending on what else you want the Arduino to do, this may or may not be the best solution.
Depending on what else you want the Arduino to do, this may or may not be the best solution.
OP says that he/she has 15 values. It doesn't take much imagination to think that maybe they are not all to be on or off for the same duration. Therefore, delay() is unlikely to be the proper solution.