I'm using fllowing code segment to sleep specified amount of time and wake up continously.
from pytrack import Pytrack
from DS3231 import DS3231
print('Starting main')
pycom.rgbled(0xff00)
# # Init Objects
py = Pytrack()
print('After init pytrack object')
rtc = DS3231() # RTC Object
time = rtc.get_time() # Try to get the time as soon as possible
print("Time", time)
for i in range(0,10000):
pass
print('after wait')
py.setup_int_pin_wake_up() ## run if you want to interupt off the external OI pin 6
print('Setting up wake up pin')
# go to sleep for sleepTime seconds maximum if no accelerometer interrupt happens
py.setup_sleep(720)
print('After sending sleep')
py.go_to_sleep(False) # disable back-up power to the GPS receiver
print('After turning off GPS power')
The output will look similar to this:
Boot
WMAC: 30AEA4EC7CA8
Firmware: 1.20.1.r2
Pybytes: 1.3.0
WARNING! Your sigfox radio configuration (RC) is currently using the default (1)
You can set your RC with command (ex: RC 3): pybytes.set_config('sigfox', {'RCZ': 3})
See all available zone options for RC at https://support.sigfox.com/docs/radio-configura
Connected using Sigfox. Only upload stream is supported
Pybytes connected successfully (using the built-in pybytes library)
Pybytes configuration read from /flash/pybytes_config.json
Starting main
After init pytrack object
6
1
Time (2020, 1, 27, 16, 23, 56, 0, 0)
Previous board is not available anymore
Exact steps to cause this issue
Upload the code.
Let the board run the code in sleep and wake up cycles.
What you expected
Wake up in every ~12 mins and light the LED and run empty loop continuously and go to sleep again.
What happened instead
These wake up and sleep cycles works as expected in every 12 minutes for around 16 hours correctly but after that, the board stops waking up. Same result with USB charger power adapter to power the device and as well. Tried using laptop power (laptop is always in the wake-up mode.) and in the console, no errors but did not wake up from the sleep. Using the time printed in the console it is able to see it was working fine before but suddenly stopped waking up.
I'm using fllowing code segment to sleep specified amount of time and wake up continously.
The output will look similar to this:
Thank you!