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