The accelerometer is a compact motion sensor that provides triaxial acceleration measurement, enabling it to detect movement in three directions: X-axis, Y-axis and Z-axis. Its operation is based on capacitive sensors that react to gravitational and inertial forces.
For this course, we’ll be using the ADXL335. This uses micro-machined elements to measure acceleration, transforming these movements into electrical signals that can be interpreted by the Arduino.
The advantage of this accelerometer is its versatility. It can be used in a variety of projects, including motion detection, object stabilization, robotics and even virtual reality applications.
Z, Y and X axis : Connect to one of the analog pins on the Arduino board.
GND: To be connected to the ground of your Arduino board
VCC: Connect to +3.3V on your Arduino board
Here’s the circuit diagram for connecting the accelerometer to the arduino board:
Here’s the program to run the adxl335 accelerometer. For this component, you don’t need a library to retrieve the values: