For a long time I’ve been thinking about incorporating the accelerometer or/and the gyroscope into my projects but don’t really know what I want to build. This past week, I realised that I could make another remote control for my RC car using an accelerometer, and immediately started building it. The accelerometer module I used is a MMA8451 breakout. The one shown in the picture is not from sparkfun but has a very similar schematic. I used the example code from sparkfun to read acceleration values from the accelerometer and the corresponding command for the RC Car is sent out using the XBee. I added a 5×7 LED matrix to shown the command currently being sent out in the form of arrows and, if the car is not moving, a circle. You can use the remote in either the landscape mode, which is similar to playing mario cart using the wiimote, or the portrait mode, where every instruction is based on the position of the remote relative to the horizontal plane. I will make a video to demonstrate the full functionality of this remote soon.
About the XBee
The D1 is a 3.3V zener diode with part number 1N4728 (1W) or 1N5226 (1/2W). The MCP1700 is a low dropout voltage regulator and you can find the 3.3V version here. DIN, VCC, and VSS are the only three connections you need to make on the XBee breakout.