Hi, I am new to accelerometers and want to hook one up to my

Hi, I am new to accelerometers and want to hook one up to my 300 led 10x30 led rectangular matrix that I have currently displaying pixelated animations. I would like to achieve a bouncing ball effect or have my matrix display a rectangular border while there is one led in the middle that is on and can be tilted side to side to roll around and stop when it has detected the collision at the corner of the border (and be able to jump when I jump).

I have never played around with an accelerometer before (I do know calculus and will be taking physics soon probably in the spring if that helps lol…) and haven’t really found a good example online as I only seem to find examples of leds changing brightness when the accelerometer is moved. I currently have an arduino uno but I will be upgrading to the mega 2560 for bigger sketches.

I am asking for a recommendation of an accelerometer to achieve this (I don’t have one yet and don’t know which one to get that will fulfill a simple tilt / ball effect) and samples of code (preferably) and/or resources so I can get my foot in the door. I think I am competent enough to play around with a working sample of code to achieve what I am trying to do. Please let me know if I need to expand on anything and thanks a lot to anyone who is willing to help:)

If you’re thinking of upgrading to a mega, might as well go with the much more powerful Teensy. There’s a shield with motion sensors, a great library, and examples: https://www.pjrc.com/store/prop_shield.html

Adafruit also has some good accelerometers with libraries and tutorials: https://learn.adafruit.com/adafruit-lsm9ds0-accelerometer-gyro-magnetometer-9-dof-breakouts

Ah thanks alot for the links and information, I will definitely look into the teensy and prop shield @Jason_Coon

Quick tip : gravity always applies 9g downwards to the accelerometer. Keep this in mind when first playing with the output (the values confused me when I began).

@Franck_Marcotte thanks for the tip :slight_smile: