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

    ToF works from UI, not when using ampy

    Bug Report
    2
    2
    4.5k
    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.
    • H
      hkubota
      last edited by

      Hi,

      the ToF sample program does not work when running via ampy. But it works from the UIFlow.

      How to reproduce:

      • Connect a ToF sensor to the M5 stack (Firmware UIFlow 1.3.2)
      • Get the sample ToF program
      • Run via UI. Should work fine.
      • Copy&paste the Python code into a file named tof.py
      • Disconnect M5Stack
      • Run ampy reset to get the M5Stack into non-UIFlow (ampy v1.0.7 used)
      • Run ampy run tof.py

      You'll see that the distance is and stays 0

      1 Reply Last reply Reply Quote 0
      • lukasmaximusL
        lukasmaximus
        last edited by lukasmaximus

        Hi @hkubota try running it from the micropython plugin in vscode. Video tutorial on how to get setup here https://www.youtube.com/watch?v=Y9pOWgsNgKk&t=73s

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