PySense / PyTrack with FiPy - get_sleep_remaining() hangs forever (workaround)
sebastian.muesch last edited by
I got a problem while using current setup of FiPy and PySense / PyTrack.
The following example code ...
from pysense import Pysense from LIS2HH12 import LIS2HH12 import time py = Pysense() print("Approximate sleep remaining: " + str(py.get_sleep_remaining()) + " sec")
... hangs forever while the method get_sleep_remaining is called. After some research, pycoprox.py seems to hang while calibrate_rtc is called. Looks like a timing problem ... Inserting an idle-cylce at the beginning of calibrate_rtc seems to be working ...
def calibrate_rtc(self): machine.idle() ...
- FiPy 1.8.1 - 1.8.2r7
- PySense / PyTrack 0.0.8
- pycom-libraries: current (96af79b)
As the workaround is not a final solution, any ideas regarding a final one?
crumble last edited by
Be aware, there are some differences in the python implementation.
- flush in the print function pops up with an error message. For me this parameter never seemed to work, so it is only nasty to remove it.
- nvs_get throws exception on none existing dictionary key instead of None. (This may came up much earlier, but I ran into this on testing with rc11)
tuftec last edited by
I was having similar issues with FiPy and calls to machine.deepsleep().
After a bit of discussion with Pycom, they issued me with a new version of firmware 1.20.0.rc10.r1. I am not sure whether or not this has been made as a public release yet. It did solve my immediate problem.