The ADXL345 is a three-axis accelerometer with ±2, ±4, ±8, and ±16 g ranges and I2C or SPI communication. At rest it measures the gravity component along…