Hi!
I need some help. I need to train an animal to drink water when an LED lights. How can I write this in the code: An LED lights once for 1 second, and just then (the LED must have been lit, I don´t care if now is turned off), an IR beam (emitter+receiver) is able to be read as broken in a time window of 4 seconds to activate 1 solenoid valve for 1 second. And so on.
If you know any code that could help me, please post it. Thank you!