🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Using a PaHUB with NeoPixel, is it possible, how do a find/set the address of the unit when accessing via the PaHUB?

    Scheduled Pinned Locked Moved Units
    3 Posts 2 Posters 3.8k Views
    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.
    • T Offline
      Tomarno
      last edited by Tomarno

      Hi. I am trying to connect and access a UHF RFID reader and NeoPixel RGB strip connected to a PaHUB and then to a Core2. Firstly, I note that for these two units, PaHUB is not an option in the Port selector (so perhaps they're not compatible)? If this should work then how should I code this MicroPython; I have done the following having connected to the NeoPixel on Pin 0:

      pahub_1 = unit.get(unit.PAHUB, unit.PORTA)
      neopixel_1 = unit.get(unit.NEOPIXEL, unit.PAHUB0, 10)

      However, any attempt to use the neopixel e.g.
      while True:
      neopixel_1.setColorFrom(1, 5, 0x183737)

      have failed? Any advice would be much appreciated as I'm a complete Novice.

      Regards,

      Tom

      1 Reply Last reply Reply Quote 0
      • felmueF Offline
        felmue
        last edited by felmue

        Hello @Tomarno

        PaHUB is an I2C extender allowing multiple I2C devices (using the same I2C address) on the M5Core2 I2C port A.

        Unfortunately neither of the two units you are trying to connect are I2C devices.

        UHF RFID reader unit is an UART device and NeoPixel requires dedicated GPIOs as the timing needs to be quite accurate.

        From UIFlow I understand that you could connect NeoPixel to port B and UHF RFID reader to port C. But you'll need an M5Go2 battery bottom to get port B and port C.

        If you want to try out either of the two units, they can be connected to port A, but only one at that time.

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        T 1 Reply Last reply Reply Quote 0
        • T Offline
          Tomarno @felmue
          last edited by

          @felmue Thank you so much, you've saved me hours of trawling.

          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