Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. nicenemo
    3. Best
    N
    • Continue chat with nicenemo
    • Start new chat with nicenemo
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by nicenemo

    • RE: Not possible to connect Pa.HUB on M5Stack CORE2

      I have the same problem with the PaHub and two ToF sensors.
      Firmware Used: v1.7.2-core2

      Simple code to reproduce below. And Screenshot for graphical representation.

      from m5stack import *
      from m5stack_ui import *
      from uiflow import *
      import unit
      
      screen = M5Screen()
      screen.clean_screen()
      screen.set_screen_bg_color(0xFFFFFF)
      pahub0 = unit.get(unit.PAHUB, unit.PORTA)
      tof0 = unit.get(unit.TOF, unit.PAHUB0)
      tof1 = unit.get(unit.TOF, unit.PAHUB1)
      
      label0 = M5Label('Text', x=21, y=13, color=0x000, font=FONT_MONT_46, parent=None)
      label1 = M5Label('Text', x=21, y=71, color=0x000, font=FONT_MONT_46, parent=None)
      
      
      while True:
        label0.set_text(str(tof0.distance))
        label1.set_text(str(tof1.distance))
        wait_ms(2)
      

      0_1612978556386_screenshot.png

      posted in Bug Report
      N
      nicenemo