Go Down

Topic: IR beam-break-tiggered valve (Read 5459 times) previous topic - next topic

barryjuait

Hi guys!

I'm just an Arduino begginer so I need some help with the code of my project.
I need a system where there is an IR beam. When the IR beam is broken by 1 second, it must to activate a solenoid valve by 100ms.
If the beam is broken less than 1 second the solenoid remains turned off.
It is important to say that the IR beam should not be broken again (or read as broken) for at least 2 seconds.

How can I write it in the code??

Thank you very much!!!



jremington

Start by studying the "blink without delay" tutorial, so that you understand how to do the timing.

Go Up