Simplest way to work with Relays with Python
I am really new at this. I am trying to use a unipi1.1 with python from a RaspberryPi 4.
I managed to read the GPIO, with some buttons attached but I cannot figure out how to turn on and off the relays.
What would be the simplest way to do it?
Thnak you in advance.
the relays are connected via I2C expander MCP23008. You can communicate directly with the chip by using e.g. this tutorial: https://learn.adafruit.com/using-mcp23008-mcp23017-with-circuitpython/python-circuitpython
Or, which is more preffered way, to use our API called Evok: https://github.com/UniPiTechnology/evok. With this API, you will get a uniform access to all IOs across all our products.