PbHUB V1.1 on ATOM Matrix with MicroPython

  • Hi,

    I started some weeks ago playing around with M5Stack components. I love the Atom. It is chosen as the main "work horse" of my projects.

    Want to not use the cloud for programming and I also could not bring M5Burner or UIFlow to work locally.
    So I flashed MicroPython via esptool and use ampy for bringing my scripts to the ATOM.

    I worked out successfully a project with the i2c connected Thermal camera unit.

    Now on my second project I want to connect 3 to 4 Watering Units to the ATOM. With only one connected to the ATOM it works all ok.

    But now to my problem (sorry for the long intro...).
    When I now connect the PbHUB 1.1 to the Atom, it is visible in a i2c.scan() with the right ID, but only until I try to access one of its registers. Whenever I do that, I get an exception from type OSError.ETIMEDOUT. After that also a scan will not find the device again until it is freshly connected.

    I tested with 2 PbHUB devices and the second was never connected to a watering unit or any other device. So I am quite sure it is not an hardware failure issue.

    I read in the docs that the PbHUB V1.1 is based on STM32 and the Input/output PINS are only 3,3V. But I don't think that this holds true also for the grove connector, right?

    Do somebody know what the root cause of my problem is?

    Thanks for the help in advance!

  • Check the voltage on the rails, it could be that that many devices is killing the voltage.
    The data lines are 3v3 but the voltage lines are 5V.
    Switch back to UIFlow firmware (you don't need uiflow guide to code it as it built on micropython.)

    There is a problem with mainstream micropython that causes issues like the timeout bug when it comes to I2C.write.
    I discovered this bug after corrupting a hub

  • Hi,

    and thanks for the quick reply and help.

    I checked without any device connected and got the same behavior.

    To try with the UIFlow firmware like suggested, can you please describe how on an Atom device I can make the firmware to execute the boot.py and main.py out of the flash, so I can use my tooling how described?

    It not worked until now. I can connect to the repl, but there is something running, even when I am in the (blue) usb programming mode.
    From where the UIFlow firmware executes? Can I put my stuff there with ampy?

    Thanks for the help again!