Simplest way to work with Relays with Python
-
Hi guys,
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.
-
Hi @RaspBeginner,
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-circuitpythonOr, 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.
Best regards,
Martin
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login