Hey everyone! I have a little issue, I am trying to implement a two way relay module into one of my projects but there seems to be an issue. The program below is the one I am using.
int R1 = 9;
int R2 = 10;
void setup() {
// put your setup code here, to run once:
pinMode(R1, OUTPUT);
pinMode(R2, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(R1, HIGH);
digitalWrite(R2, LOW);
delay(5000);
digitalWrite(R2, HIGH);
digitalWrite(R1, LOW);
delay(5000);
digitalWrite(R2, LOW);
digitalWrite(R1, LOW);
delay(5000);
}
Here's the problem, the relays work as intended when one channel is on an the other is off, however when both channels are supposedly LOW, the leds on the module turn on and so do the relays themselves. Could someone explain why this is happening?
I am using an arduino nano , and 2 relay module from sunfounder,
this is the module and the wiring diagram
Any advice would be appreciated
