ToF works from UI, not when using ampy
-
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
-
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
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