I have built a sketch using the RTC library and have put the MKR1000 to standby, waiting for the alarm to wake it up (once a minute), putting it into standby using:
This all works fine in principle. However (the mkr1000 is connecting during setup() to a wifi network), this "standby" does not seem to put the wifi into standby, the board still consumes 90mA during "standby". (which is not exactly what I would call "very low power")
How can I put the wifi module also into a sleep/standby mode? I did not find any standby() or sleep() functions in the wifi101 library.
the RTC is integrated in the chip (in the SAMD controller).
But I don't know how to reduce the current consumption to values lower than 2mA - in the meantime I use an opto-relay to disconnect the MKR1000 from the battery completely.
When I remember correctly (sorry, I did not document this properly because 2mA was way too high for me ...), there were additional API calls after disconnecting from the wifi with m2m_wifi_disconnect() or Wifi.disconnect():
m2m_wifi_deinit(¶m) (?)
nm_bsp_deinit()
I have some example code from ATMEL - however, this is for the WINC1500 evaluation board, using ATMEL Studio. Please send me your email address if you are interested in this code.
Thanks for the response. I'll try some of the recipes you used above, but I'm not sure I'll understand much from the Atmel example code. I'll have to pass on that for now.