🤖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

    Scheduled Pinned Locked Moved Bug Report
    2 Posts 2 Posters 5.6k 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.
    • H Offline
      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 Offline
        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

        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