• Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Simplest way to work with Relays with Python

    Scheduled Pinned Locked Moved General Discussion
    2 Posts 2 Posters 1.2k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      RaspBeginner
      last edited by

      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.

      Martin KudláčekM 1 Reply Last reply
      Reply Quote 0
      • Martin KudláčekM
        Martin Kudláček @RaspBeginner
        last edited by

        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-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.

        Best regards,
        Martin

        1 Reply Last reply
        Reply Quote 0

        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
        • First post
          Last post