🤖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?

    Units
    2
    3
    3.0k
    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
      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
        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
          Tomarno @felmue
          last edited by

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

          1 Reply Last reply Reply Quote 0
          • First post
            Last post