arduino 8 channel relay code

} bacily instead of buying 8 outlets for 8 ports you only have to buy 4 outlets for the same amount of control. Since I don't have a picture for this one I put some red lines representing the wires I put in. In this page you will get the code to control 16 channel relay module using Arduino. Reply This was awesome!Thank you! When connecting the arduino to the relay board sain smart uses optically isolated boards. It acts almost like a shortcut to the for statement above. As a contractor I should tell you that the box should really be water tight and have more protection around the high volt side in case of loose wire spark. This is a 5V 8-Channel Relay interface board, Be able to control various appliances and other equipment with large current. any ideas on how to make it flash to music? for(int x = 2; x < 10; x++){ //turns off lights at the 1st picture they dont look so happy! }. delay(timeC); Share it with us! Now the space management in this box could have been a lot better but all i cared about was if it worked or not. allOff(); AlternateColors(); int relay8 = 9; The active wire is connected to Normally Closed and common int relay = 8; volatile byte relayState = LOW; // PIR Motion Sensor is connected to D2. for(int x = 3; x <= 10; x=x+2){//back rewind counter w The following code is for the basic 4 Relay Module connection to the Arduino. For project details, Circuit scheme, Arduino shield proteus PCB and Arduino code please visit: For control Arduino via Bluetooth, it’s a simple, basic and functional apps The Arduino Bluetooth Relay 8 Channels App supports to control 8 channel relay module via Bluetooth (HC-05, HC-06, HC-07 ect.) Which means that the arduino can just power an led that in turn switches the relay closed or open(on or off). You will learn the meaning of lower trigger and high trigger. delay(timeC); Thanks for the 'ible. pinMode(relay4, OUTPUT); Finally cover all connections so that nobody can accidentally touch the wires. 3. I was looking for a simple example of code and connection diagram to test my relay board. pinMode(relay2, OUTPUT); for(int x = 2; x < 10; x++){//single counter on/off }, void WcounterOpp(){ 4 years ago. All relays are basically the same and use very old technology. Add the following snippet to your HTML: