Datasheet

Accelerometer Demo
Open up File->Examples->Adafruit_LIS3DH->acceldemo and upload to your Arduino wired up to the sensor
Depending on whether you are using I2C or SPI, change the pin names and comment or uncomment the following
lines.
Once uploaded to your Arduino, open up the serial console at 9600 baud speed to see data being printed out
// Used for software SPI
#define LIS3DH_CLK 13
#define LIS3DH_MISO 12
#define LIS3DH_MOSI 11
// Used for hardware & software SPI
#define LIS3DH_CS 10
// software SPI
//Adafruit_LIS3DH lis = Adafruit_LIS3DH(LIS3DH_CS, LIS3DH_MOSI, LIS3DH_MISO, LIS3DH_CLK);
// hardware SPI
//Adafruit_LIS3DH lis = Adafruit_LIS3DH(LIS3DH_CS);
// I2C
Adafruit_LIS3DH lis = Adafruit_LIS3DH();
© Adafruit Industries https://learn.adafruit.com/adafruit-lis3dh-triple-axis-accelerometer-breakout Page 15 of 22