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

    Pb.HUB will not connect. [Fixed]

    Scheduled Pinned Locked Moved Units
    18 Posts 3 Posters 15.0k 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.
    • I Offline
      IsoEek
      last edited by

      I can't connect PbHUB V1.1 to Atom Lite or Tough.

      1 Reply Last reply Reply Quote 0
      • P Offline
        pandian.nano
        last edited by

        0_1692073783955_398fc519-6e86-4b3c-a921-debdf65b563a-image.png
        First check if pbhub is connected or not? Check whether the i2c scan device result is [0x61] or [97].

        I 1 Reply Last reply Reply Quote 1
        • I Offline
          IsoEek @pandian.nano
          last edited by

          @pandian-nano Thanks for the suggestion and help. This is what is in the terminal.

          === from m5stack import *
          === from m5stack_ui import *
          === from uiflow import *
          === import i2c_bus
          === import time
          === import unit
          === screen = M5Screen()
          === screen.clean_screen()
          === screen.set_screen_bg_color(0xFFFFFF)
          === pbhub_0 = unit.get(unit.PBHUB, unit.PORTA)
          === i2c0 = i2c_bus.easyI2C(i2c_bus.PORTA, 0x00, freq=400000)
          === i2c0.addr=(0x68)
          === while True:
          === print(i2c0.scan())
          === wait_ms(200)
          === wait_ms(2)

          Traceback (most recent call last):
          File "<stdin>", line 10, in <module>
          File "unit.py", line 190, in get
          File "<string>", line 1, in <module>
          File "units/_pbhub.py", line 15, in init
          File "units/_pbhub.py", line 21, in _available
          Unit: Pb.hub unit maybe not connect

          1 Reply Last reply Reply Quote 0
          • I Offline
            IsoEek
            last edited by IsoEek

            I have lost track of how many times ive erased and downloaded the firmware. This is the last Terminal screen.

            Connected to Serial Port!
            ( �m�!0ϟ��( �m�!0���
            _ __ _
            _ ()/ | | _____ __
            | | | | | |
            | |/ _ \ \ /\ / /
            | || | | | | () \ V V /
            _
            ,||| ||___/ _/_/

            APIKEY: 2F9D3FE8
            Traceback (most recent call last):
            File "main.py", line 12, in <module>
            File "unit.py", line 190, in get
            File "<string>", line 1, in <module>
            File "units/_pbhub.py", line 15, in init
            File "units/_pbhub.py", line 21, in _available
            Unit: Pb.hub unit maybe not connect
            MicroPython b0cb55176-dirty on 2023-08-03; M5Stack with ESP32
            Type "help()" for more information.

            I felt I was making decent progress at first. I have had so many failures now, I question the little bit I do know. Tried Uiflow V2 but Pb.Hub is not available.

            1 Reply Last reply Reply Quote 0
            • P Offline
              pandian.nano
              last edited by

              Hi,
              0_1692166943010_b7264557-1bd6-4644-85a7-13606f0708ec-image.png

              0_1692167268589_7e4f250d-e7a6-4a0f-87f9-fff2bafa0fd7-a90fa071078c2fe2db6a48d44bc9637.jpg

              Please check again and check the result

              I 1 Reply Last reply Reply Quote 1
              • I Offline
                IsoEek @pandian.nano
                last edited by IsoEek

                @pandian-nano Thanks. This is the out come. I looked up the Hex for 96 and I get 0x60. I believe I need to set init and/or set the new address. Is the answer as simple as using the Write Memory Data under I2C Master? Is the included block what I need to burn? I'm doing my best to learn this, but damn there is a lot to learn!

                0_1692218108337_I2C Scan.jpg

                0_1692220299736_uiflow_block_1692220224825.png
                I tried using this code and I had no change.

                1 Reply Last reply Reply Quote 0
                • P Offline
                  pandian.nano
                  last edited by pandian.nano

                  @IsoEek
                  0_1692243253849_e2335b7e-3939-4742-abac-042470089fdb-image.png

                  • Please check again and check the result 0x61[97]

                  • If you get 0x61 result then your pbhub i2c address was changed from 0x60 to 0x61

                  0_1692243768795_1ad5c729-6942-4943-a699-6257d3a3432d-image.png

                  I 1 Reply Last reply Reply Quote 1
                  • I Offline
                    IsoEek @pandian.nano
                    last edited by

                    @pandian-nano said in Pb.HUB will not connect.:

                    97

                    I now get [97] and True. I just tried using digital and analog read. Both are working as expected. That was a really cool party trick! Where can I read more about what you walked me through. I obviously have no issues making bad code. I need to know how to clean up my own messes and how to debug. Thank you so much for the help. I appreciate it more than you know.

                    1 Reply Last reply Reply Quote 0
                    • P Offline
                      pandian.nano
                      last edited by

                      @IsoEek https://docs.m5stack.com/en/quick_start/m5core/uiflow

                      I 1 Reply Last reply Reply Quote 1
                      • I Offline
                        IsoEek @pandian.nano
                        last edited by

                        @pandian-nano Thank you. I have read through that several times and it makes no more sense than the time before. I'll eventually come across something that I understand and it will sink in. Thanks again.

                        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