Connecting our hardware
Let's begin this project by getting all the hardware set up and connected. Once connect each piece of hardware, we will do a quick test to check whether it is working as expected before moving on.
Let's start with the accelerometer.
Connecting our accelerometer
To communicate with our accelerometer, we need to connect four of the points on the board to four of the GPIO points on Pi Zero. The ADXL345 board uses I2C, so we will be using the same connections as we did with the Scroll pHAT HD, except we will be using a 3.3V power instead of a 5V power this time. This diagram shows us how we need to connect the ADXL345 to our Pi Zero:

As the ADXL345 is such a tiny board, we will be locating it in the lid of our Pi Zero case. Strip and tin each end of a black, red, yellow, and blue wire so that they are about 5 cm long. This time we are going to solder them to the front of the board, as this wiring will all remain inside our case. Solder the four cables to your Pi Zero and...