![](https://i0.wp.com/www.exploringarduino.com/wp-content/uploads/2019/07/LIS3DH.jpg?resize=350%2C263&ssl=1)
Image courtesy of Adafruit
An accelerometer is one of three common positioning sensors that you might find in a modern smartphone (the other two being a gyroscope and a magnetometer). The STMicroelectronics LIS3DH can measure linear acceleration in X/Y/Z. You can connect it to your Arduino using an I2C or and SPI interface.