Accelerometer Parasol

Hey all, not sure if this is possible.
I have a parasol with LEDs on top, which is mapped in 2D.
I’m using the Pico+ 6-axis
I’d like to use the accelerometer to show which way is up when the parasol is laid on it’s side, so the top is directed outwards toward the audience.

The pico+ is mounted vertically on the handle of the parasol, perpendicular to the plane where the LEDs are.

Ok so pictures should help right?

So here’s the Pico+ in a case, mounted vertically on the handle of the parasol along with the battery

Here’s the pico+ in relation to the LEDs on top of the parasol:

and here’s the parasol “facing the audience”:

Now, in that last picture, I’d ideally want to know which way is up, and have rain going down or flames going up, and as you spin the handle, the parasol would rotate say 180 degrees so the up is inverted, it should auto-correct.

All the accelerometer patterns seem to use Z for “up” but I’d want to use some combination of XY for determining up.
Is this possible?

Thanks in advance!

so basically exactly this

except the pico is mounted on the axle instead of the spokes. Should I just move the pico to the spokes?

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.

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!

1 Like

Changed
gyro = sixAxis[5]
to
gyro = sixAxis[4]
and that pattern is now working!

Thank you Irwin and also scorceror for posting the six axis details here:

thanks everyone!

1 Like

actually, is there a full manual on sixAxis and accelerometer somewhere I’m missing? I didn’t see it in documentation.

LETS. FUCKING. GOOOOOOOOO

4 Likes

For the 3-axis accelerometer on the sensor board, check out this:

https://electromage.com/docs/sensor-expansion-board#accelerometer

I should add something similar for the 6-axis accel/gyro to the Pico page!

Wow. That’s looking amazing!

random request, but does anyone know how I could modify this code to create a green triangle that stays stationary while I spin the parasol? This parasol will be used in a stage performance tonight, and the performer’s logo is a green triangle pointing right (play button).
Thanks in advance!