SodaqMoja / SodaqOne-UniversalTracker-v2

6 stars 15 forks source link

on-the-move interrupt #4

Closed KKjelstad closed 3 years ago

KKjelstad commented 7 years ago

It seems like the interrupt for on-the-move enabled with:

attachInterrupt(ACCEL_INT1, accelerometerInt1Handler, CHANGE);

is not triggered when the device is in sleep. It did work very well when the device was connected with serial debugging, but disabling the debug also disabled the interrupt. At least that is my conclusion from the observations I have made.

Changing the mode to HIGH has resolved the issue:

attachInterrupt(ACCEL_INT1, accelerometerInt1Handler, HIGH);

I haven't studied any datasheets so not sure if this is the correct way to resolve the issue though.

pdemil commented 7 years ago

Maybe this can help to make the CHANGE work when the device is in sleep. http://forum.sodaq.com/t/interrupt-doesnt-wakeup-autonomo/590/5 http://forum.arduino.cc/index.php?topic=410699.msg2827922#msg2827922

alextsam commented 7 years ago

Commit https://github.com/SodaqMoja/SodaqOne-UniversalTracker-v2/commit/c8cd6ad8298b9f2b4fb3f4e1ec1cbad1f9b066a1 should be fixing this. @KKjelstad Could you close this issue if it is resolved for you as well?