Hallo,
I want to solve the following problem:
In my system I use MicroPython mode. The devices are program using PyCharm IDE. Every things works well.
I have 3 Xbees (1 coordinator) and 2 end devices. The end devices send samples every 1 sec and sleep 0.5 sec. But, sometimes, the coordinator will be manually turned off. The end devices cannot be turned off manually (enclosed in a sealed box). So, I would like to make the end devices sleep long when there is no coordinator on and awake them when the coordinator turns on again. Is there a way we can do this automatically using MicroPython?
Also, The problem is that the coordinator might be turned off directly in the power, so there is no time to send an api command to make all xbee sleep.
In the power-down case I will like to power-up periodically and try to send a message to the coordinator. If it succeeds stay awake and revert back to the 1 sec behavior. Otherwise power-down again.
My setting should work 8hrs/day and 5days/week.
Thanks in advance for your help!
Regards,
Achille T.