#How can i convert a number-int into a PIN?

1 messages · Page 1 of 1 (latest)

white monolith
#

I have an array of int that i am reading from a .json file and i want to convert them into board.IOX for example, how can i do that?

white monolith
#

I managed to get the PINS like this:

pins = []

for pin_number in config_object["pins"]:
    pin = getattr(board, "IO" + str(pin_number))
    pins.append(pin)