Ok, good to hear :) I will do a pull in the next days first adding deepsleep and modemsleep. However it seems to be possible to implement what you have done for the STM boards by using lightsleep. I found the following code (using light sleep and a timer):
//sleep over.
void fpm_wakup_cb_func1(void)
{
wifi_fpm_close(); //disable sleep function
wifi_set_opmode(STATION_MODE); //set wifi mode to station mode
wifi_station_connect(); //connect ap
}
void user_func(...)
{
wifi_station_disconnect();
wifi_set_opmode(NULL_MODE); //set wifi mode to null mode.
wifi_fpm_set_sleep_type(LIGHT_SLEEP_T); //set force sleep type, clsoe rf&cpu
wifi_fpm_open(); //enable force sleep fucntion
wifi_fpm_set_wakeup_cb(fpm_wakup_cb_func1); //Set fpm wakeup callback function
wifi_fpm_do_sleep(10*1000); // do sleep
...
}
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Ok, good to hear :) I will do a pull in the next days first adding deepsleep and modemsleep. However it seems to be possible to implement what you have done for the STM boards by using lightsleep. I found the following code (using light sleep and a timer):
Source
I think that would be the next step then...