Close

Vertical Motion Test

A project log for Interactive Mario Mushroom Block

Ever want to punch a mario block and get a mushroom to come out? Me too, so I'm building it.

scott-clandininScott Clandinin 02/14/2017 at 01:140 Comments

The next test was to try out the CurieIMU (Internal Measurement Unit) library and see how it can record and manipulate data. For my purposes I wanted to use the accelerometer to find when there was downward acceleration of the Mario block. To get an idea of how it worked I used the serial monitor to display in real time what effects movement had on the readings. As I am mounting the Arduino 101 vertically on the side of the block tin, I needed to find notice the "at-rest" value and which axis changed with vertical movement.

For this the Y-axis represented vertical movement and the at-rest value was 1.0. Lifting the Arduino quickly brought that value above 1.0, and dropping the Arduino brought the value below 1.0. I picked a value well enough below 1.0 to distinguish a free-fall. Since people aren't perfect, as we are lifting the block up, it isn't purely experiencing positive acceleration. It is important to distinguish this from a free fall as I don't want the lid to open until after it had fallen back down to rest.

Discussions