I have the Arduino Uno and 4ch relay board that I am controlling using serial data. I am just learning the Arduino so I am using different pieces of code I am finding online and in examples to do simple functions. However the reason I got into this is because I am trying to control 4 lights that I would like to be able to turn on individually but only 1 can be on at a time.
For example if I send the command "R" I want the red light to turn on, and if I send the command "B" I want the red light to turn off and the blue light to turn on, if I send command "G" I want the blue light to turn off and the green light to turn on, etc. And possibly if I send a "O" command whatever is on will go off.
Of course what is actually being turned on and off are the relays which are turning on lights powered by 110vac or more accurately pins 2,3,4,5 going HIGH / LOW and activating and deactivating the relays.
I hope I explained this clearly and any help the community can provide would be greatly appreciated.
Thank you all.