How to trigger a Relay AND turn on an external LED with the same output pin.

Goal - Use a single Arduino pin to turn on a Relay(energize it's coil) while simultaneously turning on an Indictor LED located on a separate panel.

Problem - digitalWrite(pinout, HIGH) turns on the LED but turns off the Relay.
digitalWrite(pinout, LOW) turns off the LED while turning on the Relay.

note: I am using the NC connections of the RELAY.

Can I Turn on the relay AND the LED utilizing the same pin?

Yes. Just connect the led + series resistor between 5V and the pin.

I assume you are using a relay module, with a transistor or opto-isolator, rather than a bare relay? An Arduino pin cannot provide enough current to energise a relay's coil directly, and could be damaged.

Thanks SO much!
I spent a day trying to figure out how to make this work by myself. :confused: