Hiverize / FiPy

4 stars 11 forks source link

Add deep sleep between readings #2

Open ClemensGruber opened 5 years ago

ClemensGruber commented 5 years ago

see https://docs.pycom.io/datasheets/boards/deepsleep/api.html

einsiedlerkrebs commented 5 years ago

I have tried deep sleep, but without success. Tried 1s sleep but device didn't wake up.

I have to admit that I did not do any debugging on this yet. see: https://github.com/hiveeyes/hiveeyes-micropython-firmware/commit/191a46b9a6063ce2d05997e655a3f9e5164bd683

amotl commented 5 years ago

Hi there,

with one of the recent commits [1], the Hiveeyes MicroPython Datalogger Firmware for BOB should support deep sleep well, at least it works on my machine ;].

You might want to pick up the cherries into this codebase. The update will probably not be that difficult, as you can see the patch is rather non-invasive [2] and should reasonably blend into any piece of Pycom MicroPython code.

We will be happy [3] to see or add refinements, especially wrt. to computing the appropriate time_until_next_measurement as seen here with [4].

Cheers, Andreas.

[1] https://github.com/hiveeyes/hiveeyes-micropython-firmware/commit/3e73a3fe [2] https://github.com/hiveeyes/hiveeyes-micropython-firmware/commit/3e73a3fe#diff-c23a2e105b0f535cc439641a30ae7806L177 [3] https://github.com/hiveeyes/hiveeyes-micropython-firmware/issues/4 [4] https://github.com/Hiverize/FiPy/blob/d4c05d12fdf586e69c2296bb1a4ebf300e44f97d/main.py#L75-L81

amotl commented 5 years ago

We just wanted to ping you about that @pinguin999 pushed the relevant bits and pieces to https://github.com/Hiverize/FiPy/pull/9. Thanks already!