Is the imp004m imp.wakeup() inaccurate on the muRata breakout board? It seems to be a couple of seconds off over a 60 second timer. This board does have a 32kHz crystal, correct? For example, this code:
prev <-0;
prev_us <-0;
function loop() {
local now = time();
local now_us = hardware.micros();
local delta = now - prev;
local delta_us = now_us - prev_us;
prev = now;
prev_us = now_us;
imp.wakeup(60,loop);
server.log(delta+" "+delta_us/1.0e6);
}
loop();
Gives this log:
2017-11-08 15:59:08 +11:00 [Device] 58 60.0126
2017-11-08 16:00:07 +11:00 [Device] 59 60.0026
2017-11-08 16:01:05 +11:00 [Device] 59 60.0126
2017-11-08 16:02:04 +11:00 [Device] 59 60.0122
2017-11-08 16:03:03 +11:00 [Device] 59 60.0125
2017-11-08 16:04:02 +11:00 [Device] 58 60.0026
On the imp002, it’s bang on 60 seconds. Is the imp.wakeup() running off the micros timer instead of the 32kHz clock on the imp004m, which is what the timing info above seems to suggest.