Project of controlling valves through bluetooth

Good Morning,

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 ?

Thank you

João Almeida

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?

Can you give some advice i don´t know much about this theme,

And I don't know what you mean by theme, or what you are actually trying to do, so I can't help.

I want to use 2 valves, (but i will control them with relays) each one separatly, but only for a few seconds,

I dont know what is the function that i have to use.

digitalWrite().

Can i get the tuna salad video? i am quite hungry right now.

I was actually joking, but, hey, there really WAS a tuna salad video.

I don t know how to program the timer.

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()".