Book Image

Wearable-Tech Projects with the Raspberry Pi Zero

By : Jon Witts
Book Image

Wearable-Tech Projects with the Raspberry Pi Zero

By: Jon Witts

Overview of this book

With Wearable-Tech Projects with the Raspberry Pi Zero, you will begin with learning how to install the required software for your upcoming projects. You will also learn how to control electronic devices with the GPIOZero Python library. Next, you will be creating some stylish wearable-tech projects such as a motion-reactive LED cap and a Tweet-activated LED T-shirt. Toward the end of the book, you will be creating some useful health and fitness wearable-tech projects; these will help you monitor your heart rate, track your movements with GPS, and count your footsteps with your own pedometer. By the end of the book, you will have created a range of wearable-tech projects and learned enough about your Raspberry Pi Zero that you should be able to adapt these projects further or come up with your own creations!
Table of Contents (10 chapters)

Setting up our hardware

So, the next thing to do is to get our hardware set up. We are going to make use of the same Adafruit ADXL345 accelerometer we used in our A Motion-Reactive LED Cap project; and to display the details of the steps taken so far, we will make use of the same Pimoroni Scroll pHAT HD that we used in the Scrolling LED Badge project. Both of these devices use the I2C protocol to communicate with our Pi Zero. The I2C protocol was designed to get around some of the problems with connecting multiple devices to an asynchronous serial port or an SPI port. I2C allows you to connect (over short distances) multiple devices through the same bus. Each device connected to the I2C bus must identify itself with a unique device ID.

Thankfully, our ADXL345 and Scroll pHAT HD are set to use different IDs already. This means we can connect them to the same I2C bus on our Pi Zero...