I have a doubt about timers, I need to open two valves during a certain time to release water (Ex: 2 seconds) and close after that time.
But I do not understand anything about timers and my programming level is very basic, I know the existence of the milis but if I use this method I will not be able to use other peripherals later like for example to always be to measure the temperature of the water.
The bluetooth control part is something that worries me but I have to build the APP first before I can even think about that part
if someone can give me some lights, references or some examples ?
But I do not understand anything about timers and my programming level is very basic, I know the existence of the milis but if I use this method I will not be able to use other peripherals later like for example to always be to measure the temperature of the water.
That is complete nonsense. The millis() function only returns the the number of ticks of the clock. Not calling millis() does NOT change the fact that the clock keeps ticking. Getting the number of ticks does NOT affect the number of ticks.
I need to open two valves during a certain time
During? Or for?
if someone can give me some lights, references or some examples ?
I found a youtube video about making a tuna salad. Would that be useful?
If you want to watch TV for half an hour, do you have to program your watch? Of course not. You simply note what time it is when you turn the TV on. Periodically, you look at your watch, and determine how long you have been watching TV. If it has been long enough, you hit the off button.
So, you do the same thing with the Arduino. millis() is its watch. Variables are where you record things. "Periodically" means "on every pass through loop()".