To make this very long story short, all I want to do is to turn a relay on and off using an arduino.
I bought this relay from ebay(12V 1-Channel Relay Module Optocoupler Low Level Trigger Expansion Board Arduino | eBay ).
And I got the wired like this:
Relay - Arduino
VCC to 5v
GND to GND
IN to Digital OP 7.
I see the LED on the Relay goes on every time the relay was supposed to change it's state, But when I check with the voltimeeter the NO never closes and the NC never opens.
A'm I missing something?
And this is the code:
int PowerSwitch = 7;
int PowerButton = 8;
void setup() {
pinMode(PowerSwitch, OUTPUT);
pinMode(PowerButton, INPUT);
Serial.begin(9600);
}
void loop() {
digitalWrite (PowerSwitch, HIGH);
Serial.println (" ON ");
delay(10000);
digitalWrite (PowerSwitch, LOW);
Serial.println (" OFF ");
delay(10000);
}






