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
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.