Fun with gyro #3617
Replies: 2 comments
-
Posted at 2021-01-05 by @gfwilliams 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 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 |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-01-05 by SimonT Ah yes, works as expected after a power cycle. I thought I'd only been setting that 0x11 register for full scale modes as shown in the code but it's possible I poked something else at some point. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2021-01-02 by SimonT
Here's a fun way to visualize live gyro data for the z axis - especially fun to roll the puck along a desk! Also fascinating to swing it around fast and film it in slow motion, shows a really nice fast response.
Gyro is quite power hungry so you can tap the puck to toggle it on and off.
@gfwilliams - I did notice the callback seems to be called frequently (about 280 times / sec), regardless of the rate passed in to accelOn() - bug?
Beta Was this translation helpful? Give feedback.
All reactions