# Accelerometer Parasol

**URL:** <https://forum.electromage.com/t/accelerometer-parasol/3832>\
**Category:** Patterns and Code\
**Created:** [November 9, 2024, 3:03am UTC](https://forum.electromage.com/t/accelerometer-parasol/3832 "2024-11-09T03:03:40Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Irwin](https://forum.electromage.com/user_avatar/forum.electromage.com/irwin/32/2228_2.png) [@Irwin](https://forum.electromage.com/u/Irwin)\
**Post date:** [November 9, 2024, 4:44am UTC](https://forum.electromage.com/t/accelerometer-parasol/3832/3 "2024-11-09T04:44:15Z")

</div>

Hi!

That’s my post, and it was made a while ago using the original sensor board before the 6-axis pico was available. Here’s a later update of the code that uses the 6-axis pico gyro.

> [@Sensing wheel position with the accelerometer](https://forum.electromage.com/t/sensing-wheel-position-with-the-accelerometer/1076/19):
>
> I’ve come up with some preliminary code where I modified the “Accelerometer level example” pattern to use the gyro in the Pico 6-axis accelerometer, and it’s quite simple! The correction factor on line 14 is not really required for my purposes, but it gives better accuracy over long periods time. I’m using the Z axis. Note that by using the gyro instead of the g-force values, there is no need to compensate for the g-forces generated by the spinning wheel. // Modified from "Accelerometer level …

You can leave your pico on the umbrella handle. My code uses the Z-axis, but you might need to change it to use the X or Y axis depending on which way your pico is mounted to the handle. You might not really need to know which way is “up” because the gyro axis of the pico will always be aligned with the umbrella handle.

Hope this helps!

---

_[View the full topic](https://forum.electromage.com/t/accelerometer-parasol/3832)._
