machine.pin_deepsleep_wakeup function is not working in LOPY4 firmware version 1.19.0.b2
bigboy20769 last edited by
I want to make sure that I am correct about the firmware issue. I am struggling tried to run a simple deep sleep function test, but finally, I think I found out the culprit. The function pin_deepsleep_wakeup is not included in the LoPy4 firmware version 1.19.0.b2, instead it is pin_sleep_wakeup! (word deep is missing). I am indeed puzzled why no one noticed it.
Orginal code not working:
machine.pin_deepsleep_wakeup(['P8'], mode=machine.WAKEUP_ANY_HIGH, enable_pull=True)
Modified code working:
machine.pin_sleep_wakeup(['P8'], mode=machine.WAKEUP_ANY_HIGH, enable_pull=True)
dan last edited by
It has indeed been changed. Just to note that you're using development firmware while the documentation is based on the stable version. If you check the dev documentation, you can find the changed method. Once the dev firmware has been released, the main documentation will be updated as well.
serafimsaudade last edited by
I got a PGy with 1.19.0.b4 firmware and "pin_deepsleep_wakeup" don't exist, but
"pin_sleep_wakeup" exists, and works as expected.
I think, the official documentation need a revision.
jcaron last edited by
@philwilkinson OP is not using the deep sleep shield library but
machine.deepsleepwhich is the “native” deep sleep.
@bigboy20769 I kind of remember the name change being alluded to in the release notes of a recent firmware version. Documentation is not up to date though.
philwilkinson last edited by
@bigboy20769 deep sleep class is only used for the deep sleep shield. Lopy4 does not use the deep sleep shield.