52Views2Replies

Author Options:

Arduino - Trigger only Section of sketch Answered

Hi. My sketch is to run 3 different relays over a different periods. I am new to arduino, and what i Know up untill know I've learned from reading it up. Please help me how to use an input to trigger certain parts of the sketch(the different periods)

Thanks!

2 Replies

user
Rookie89 (author)2016-10-18

thanks caitlinsdad, I'll look it up

Select as Best AnswerUndo Best Answer

user
caitlinsdad (author)2016-10-18

Learn to use the switch case statement, essentially use your trigger value to do something based on what it is. Good luck.

https://www.arduino.cc/en/Tutorial/SwitchCase

Select as Best AnswerUndo Best Answer