Skip to main content
2 of 2
missing first line of code

Relay does not trigger

Its my first attempt to work with relay I tried to test my relay with this simple code

int Relay = 2; void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  pinMode(Relay,OUTPUT);
}

void loop() {
 

  digitalWrite(Relay,HIGH);
  delay(1000);
  digitalWrite(Relay,LOW);
  delay(1000);
}

I use thius simple 12V Relay

Connected to IN -> Digital 2 GND -> GND VCC -> 5V

The only thing is happened is the LED of the relay blinking in every sec. but can not hear the clicking sound from the relay box or testing with a multimeter's diode function the two(NC and COM) OUTs aren't close I tried to test other relays(from the same type) but does not do anything else.

thank you for your help What can be wrong?