Hi all,
I have one of these
http://www.ebay.com/itm/5V-4-Channel-Relay-Module-Switch-Board-For-Arduino-AVR-PIC-ARM-DSP-PLC-/121198091538
my question is simply, how do I wire it up?
I have the GND on the pins, the VCC and K1-K4 going to the arduino, and my simple sketch makes it sound as if the relays are opening, closing correctly.
I have put a simple circuit of an LED going through p1 but it's not working
i have mains negative and positive going to HND and NO respectively
however on COM and NC on p1, i get nothing. I've obviously missed something and am by no means an electronic engineer so any help would be much appreceiated.
Drogo
Sketch is
int p1 = 8;
int p2 = 9;
int p3 = 10;
int p4 = 11;
int led = 13;
void setup() {
pinMode(p1, OUTPUT);
pinMode(p2, OUTPUT);
pinMode(p3, OUTPUT);
pinMode(p4, OUTPUT);
pinMode(led, OUTPUT);
}
void loop() {
digitalWrite(p1, HIGH);
digitalWrite(p2, HIGH);
digitalWrite(p3, HIGH);
digitalWrite(p4, HIGH);
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(p1, LOW);
digitalWrite(p2, LOW);
digitalWrite(p3, LOW);
digitalWrite(p4, LOW);
digitalWrite(led, LOW);
delay(1000);
}