I believe the callback is called whenever the IRQ line is asserted by the accelerometer/gyro - normally accelOn would then configure the accelerometer for the correct interval (which seems to work ok?) but if you configure the accelerometer for something different with accelWr then that may have an effect.
When I run your code with the commented out bit uncommented it reports 104 callbacks/sec, so I guess maybe you'd configured the accelerometer some other way while developing? Probably if you just pull the battery and re-add it then run your code again, it'll go back to 104 samples/sec
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Nice - thanks!
I believe the callback is called whenever the IRQ line is asserted by the accelerometer/gyro - normally accelOn would then configure the accelerometer for the correct interval (which seems to work ok?) but if you configure the accelerometer for something different with
accelWr
then that may have an effect.When I run your code with the commented out bit uncommented it reports 104 callbacks/sec, so I guess maybe you'd configured the accelerometer some other way while developing? Probably if you just pull the battery and re-add it then run your code again, it'll go back to 104 samples/sec