Accelerometer for Lego Mindstorms NXT
The accelerometer was created specifically for Lego Mindstorms NXT robots. It measures changes in speed so you can use it as a warning of an impact (tilt) when the velocity decreases sharply. You can also, using this sensor, track a velocity profile of your robot.
This version allows you to measure velocity changes on three different axis but you can choose to measure the accelerations of your Lego Mindstorms NXT robot on two axes instead of three. The sensitivity of the sensor is configurable.
The connection of this sensor with the Lego Mindstorms NXT is done with standard NXT cable (not supplied), on one of the ports dedicated to the sensors.
Programming the accelerometer for Lego Mindstorms NXT
The accelerometer sensor for Lego Mindstorms NXT can be programmed using NXT-G, the graphical robotic software included in the Lego Mindstorms NXT kit. To download the code of the NXT-G block, click on the following image:
The accelerometer sensor for Lego Mindstorms NXT can be programmed using RobotC, a C programming language for Lego Mindstorms NXT. Click on the following image to download the RobotC driver for the accelerometer sensor:
Here is an example of usage the accelerometer sensor: