Pages: [1]   Go Down
Author Topic: IR beam-break-tiggered valve  (Read 5313 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!!!


Logged

Oregon, USA
Offline Offline
Edison Member
*
Karma: 65
Posts: 2125
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

"It seems to run on some form of electricity"

Pages: [1]   Go Up
Jump to: