Hi.
I am having trouble trying to get a simple 5V relay to work on an Arduino Nano.
My set up is simple: I connected the pins in the relay as follows: IN to DigitalPin8, GND to Ground and VCC to 5V. The
Nothing fancy, I have not even connected anything to the other end of the realy...... I just expect the relay to click once every second according to the code below, but it is not doing what I expect
These are symptoms that may give extra info:
. The red led on the relay block turns on an off every second although it is not very bright
. If instad of connecting the IN pin to pin8 I connect it directly to 5V, the relay is indeed actuated and teh red LED lightts up at full power
I suspect I may be stumbling upon voltage issues on Pin8. any comments?
I have tried 3 different relays with the same results.
Any hints really appreciated
int relayPinOut = 8;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(relayPinOut, LOW);
Serial.println(" OFF");
delay(1000);
digitalWrite(relayPinOut, HIGH);
Serial.println(" ON");
delay(1000);
}