Automation 2040 W inputs Issue


I’ve just received my Automation 2040 W board, i’m hoping to use it to monitor the state of on external relay, my plan was the set one of the outputs to 1 and then wire it into one side of the external relay, and the other side of the relay back into one of the Automation boards input, with a view on detecting if the external relay is open or closed. For testing, i’ve wired a cable directly from the output into the input, hoping to see the input go high, however is never does, i’ve tried the other inputs but that all stay as 0. Below is the code i’m using, can anyone see what I might be doing wrong?

import time
from machine import Pin
from automation import Automation2040W, SWITCH_A, NUM_INPUTS

board = Automation2040W()
output = Pin(16, Pin.OUT)

INPUT_NAMES = (“I1”, “I2”, “I3”, “I4”)

while True:
print(“Output_Value”, output())
for i in range(NUM_INPUTS):
value = board.read_input(i)
print(INPUT_NAMES[i], " = “, value, sep=”“, end=”, ")


This is the result i’m getting printed out
I1 = 0, I2 = 0, I3 = 0, I4 = 0, Output_Value 1