FiPy Wake on Movement
Riley last edited by
Hi i have a FiPy connected to a Pysense and cannot seem to figure out how to wake the device from sleep due to motion. I've followed along with the tutorial, copied and pasted the exact code and it doesn't work. I think the issue might lie within the sleep function itself.
When i use the get_wake_reason() it returns 5, which isn't a listed value(see below). This is after pressing the reset button or plugging the devie into power. When i use the get_sleep_remaining() function the CLI "freezes" and i can no longer input anything. The get_sleep_remaining() func is dependant on the wake up reason so it's peaking the wrong memory addresses and i think that's why it is not working. Any advice ?
""" PIC MCU wakeup reason types """
WAKE_REASON_ACCELEROMETER = 1
WAKE_REASON_PUSH_BUTTON = 2
WAKE_REASON_TIMER = 4
WAKE_REASON_INT_PIN = 8
FiPy version :1.20.1.r2
FiPy connected via USB 3
Using Atom with Pymakr plugin via serial
Riley last edited by Riley
Im using the latest version of Pysense, i realized that using any of the sleep functions even just setting up sleep would break the CLI. I manually changed the memory address for the sleep reason to 1. It was working as i would expect. After powering it up a day later the memory address for the sleep reason is back to 12.
jcaron last edited by
@Riley can you check the version of the Pysense firmware and eventually upgrade it?