
Sample Sketch
void setup(){
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
}
void loop(){
digitalWrite(5, LOW);
digitalWrite(6, HIGH);
delay(4000);
digitalWrite(5, HIGH);
digitalWrite(6, LOW);
delay(4000);
}
How to Test
The components to be used are:
Microcontroller (any compatible arduino)
2 channel 5V 10A relay module
Pin connectors
Breadboard
USB cable
1. Connect the components based on the figure shown in the wiring diagram using
pin connectors. VCC and COM pin is connected to the 5V power supply, GND
pin is connected to the GND, IN1 and IN2 pins are connected to the digital I/O
pin. Pin number will be based on the actual program code.
2. After hardware connection, insert the sample sketch into the Arduino IDE.
3. Using a USB cable, connect the ports from the microcontroller to the computer.
4. Upload the program.