//Arduino Sample Code
//www.DFRobot.com
//Last modified on 14th March 2012 by HJS
//This code has been updated to work with the sample code provided in the Wiki
int Relay = 3;
void setup()
{
pinMode(13, OUTPUT); //Set Pin13 as output
digitalWrite(13, HIGH); //Set Pin13 High
pinMode(Relay, OUTPUT); //Set Pin3 as output
}
void loop()
{
digitalWrite(Relay, HIGH); //Turn off relay
delay(2000);
}
But it is only flashing the led and there is a click sound. What happen with my relay? broken?
Sounds like it's working to me. What do you expect it to do with that sketch code? The click sound is the relay turning on, take an ohm meter reading between the common and normally open relay contact and see if you have continuity, if you do that confirms your sketch is turning on the relay as your sketch is trying to do.
Most all those Asian relay boards are designed to turn on the relay with a digital LOW output and turn the relay off with a digital HIGH output. That is not a problem, just write your sketch knowing that fact.
I apology to all you because it seems my wrong to do the coding.
I forget that I put attach.servo(3); it means to the same pin with the relay, so it results in flashing, interesting.