Multiple if statements arduino?
I'm very new to the arduino environment and am having trouble writing some code.
Essentially what I need to do is turn on a relay for different periods of time based on different input.
If pin 8 is high, turn on relay for 5 minutes
if pin 9 is high, turn on relay for 10 minutes
if pin 10 is high, turn on relay for 20 minutes
if pin 11 is high, turn on relay for 30 minutes
There will be only one relay in the circuit. I.e. each pin will turn on the same relay, but for different amounts of time.
I'm not quite sure the best way to do this.
Thanks for you help in advance!