Hey,
I cannot flash the device without reseting it (power off then power on). The server logs shows that the device downloads the new code but the old one stays effective afterwards.
This is my code:
`function execute() {
if (hardware.wakereason() == WAKEREASON_TIMER) {
// poll and send things
}
else {
// do nothing and go to deep sleep
imp.wakeup(0.0, function () {
imp.deepsleepuntil(date(time(), ‘u’).hour, date(time(), ‘u’).min + 1, 0);
});
}
}
execute();`
Is this if-else condition preventing the IMP to flash with the new code?
Thanks in advance,