This tutorial may be outdated. It is no longer recommended for beginners, and may need modifications to code or hardware that is not indicated in the tutorial.


The examples in this guide are no longer supported. Check out the LIS3DH sensor guide for CircuitPython and Python usage:

Acceleration makes the world go around--literally!  It's the force that causes movement like a car accelerating away from a stop light or an object falling to the ground from gravity when dropped.  Accelerometers are small sensors that can detect the force of acceleration and are great for detecting motion and orientation.  The LIS3DH triple-axis accelerometer in particular is an inexpensive and easy to use accelerometer with features like X, Y, Z axis acceleration and click detection.  This guide will show you how to wire the LIS3DH to a board like the ESP8266 or SAMD21/M0 and start reading acceleration values from it in CircuitPython!

Before you get started you'll want to be familiar with CircuitPython, MicroPython, and the LIS3DH by reading these guides:

Continue on to learn about the hardware needed to follow this guide.

This guide was first published on Feb 26, 2017. It was last updated on Nov 16, 2018. This page (Overview) was last updated on Aug 13, 2018.