I'd like to put in stand by the mkr1000 when I'm not using it:
Currently I'm trying to do something like this:
//RTC
RTCZero rtc;
void action() {
Serial.println("Action!");
height = getHeightAIO();
weight = getWeightAIO();
sendData(height, weight);
rtc.setAlarmSeconds(2);
rtc.attachInterrupt(action);
rtc.enableAlarm(rtc.MATCH_SS);
rtc.standbyMode();
}
Unfortunately after standbyMode the board does NOT turn on. Where is the mistake?
Sorry for the very late reply but have you looked at the sleep functions examples ?
Also ensure your firmware is up to date too as there were some improvements that came with that aspect.
ballscrewbob:
Sorry for the very late reply but have you looked at the sleep functions examples ?
Also ensure your firmware is up to date too as there were some improvements that came with that aspect.
Thank you for your reply. I've tried and retried and finally I solved the problem (remember: never put a delay in the interrupt function, if possible leave it empty).
Unfortunately all my efforts were useless, from here https://www.youtube.com/watch?v=wmWqkJ97Zsc&feature=youtu.be&t=822 seems possible to reduce the power consume up to only 0.5mA. I tried with the same sketch but I reach a minimum consume of 4-5mAh during sleep.
Do you know if it is possible to reach a so low power consume?
Only ever used the regular sleep modes as I dont need to be too concerned but if you read the SAMD data sheet there are some better explanations for other power down / sleep modes.
Its quite heavy reading but worth it as there are some clever things you can access.
Been while since I referenced that sheet (when the MKR first came out).