Using an External N/O Relay to trigger an Event

How's it going everyone.
Uno Newb here.

Should be a pretty easy question. I'm using an external automation System with it's own common and NO/NC Relay option to trigger an event on the Uno.

What is the best approach to this?

Use two of the Analog Pots? If Continuity between ports..... etc...?

Thanks in advance!


digital pin with internal pullup enabled.
use relay to connect pin to Gnd when activated.
have code look for a low.

byte pinX = #; // replace # with 2 to 19, leaving 0/1 free for serial commands
void setup(){
pinMode (pinX, INPUT_PULLUP);
pinMod (13, OUTPUT); // on board LED
void loop(){
  if (digitalRead(pinX) == LOW){
  // relay is active
digitlalWrite (13, HIGH); // turn on LED
  else {
  digitalWrite (13, LOW);

Makes Perfect Sense.

Thank you again CrossRoads.

basically use an N/O Relay, I wire coming from a Digital # the other wire coming from the native Ground on the Uno. Then once connected to ground (Low) Do etc....

Knew it would be simple.

Thank you for making it easy.