Close

Second Animation and Accelerometer

A project log for Astro-chan Badge

An cute astronaut sitting on your shoulder.

dehipude Éhipu 09/30/2023 at 21:470 Comments

I had a little bit of time today, so I quickly made a second animation for this badge:

I also added the code to read the raw x, y, and z values from the accelerometer, and play this animation if the x component is greater than 5000 – which basically means that the badge is tilted to the left. Of course adding a similar animation for the right tilt is trivial. I also want to make a "stunned" animation, to be displayed after the board has been shaken – but to detect that I will need to keep some previous values and calculate the variance.

Discussions