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)

What this book covers

Chapter 1, About the Raspberry Pi. This chapter introduces the Raspberry Pi Zero computer that we will be using throughout the book; it explains how to get the required software installed and running. We will look at how we can connect to our Pi Zero over SSH from a remote computer so we can program it without having to attach a monitor, keyboard or mouse. We will then look at how we can control basic electronic devices using the Python GPIOZero library. Finally, we will wire up an 'off switch' to our Pi Zero, so that when it is running headless in our later projects, we can safely power it 'off'.

Chapter 2, Scrolling LED Badge. In this chapter we will make a scrolling LED badge that you can program to display any message across and can be worn while out and about. We will make use of the Scroll pHAT HD from Pimoroni and our Pi Zero to create your badge. We will also look at how we can incorporate a battery pack to make this a portable solution. We will use Python to program our Scroll pHAT HD to display whatever message we want. Finally, we will look at ensuring this program runs as soon as we turn on our Pi Zero.

Chapter 3, Sewable LEDs in Clothing. This chapter uses stitchable LEDs and conductive thread to transform an item of clothing into a sparkling LED piece of wearable-tech, controlled with a Pi Zero hidden in the item of clothing. We will incorporate a Pi Zero and battery into a hidden pocket in the garment and connect our stitchable LEDs to the Pis GPIO pins so that we can write a Python program to control the order and timings of the LEDs.

Chapter 4, A Motion-Reactive LED Cap. In this chapter we will make use of a Pimoroni Blinkt LED strip, an Adafruit Triple-Axis Accelerometer and a Pi Zero to create a cap with a super-bright strip of RGB LEDs across the front. This will change its colors and display pattern, based upon the direction and speed that the wearer moves.

Chapter 5, A Tweet activated LED T-shirt. This project shows us how to incorporate some LEDs into another item of clothing, a t-shirt or jumper, and again wire them back to a hidden Pi Zero and battery pack. With our Pi Zero connected to a Wi-Fi network, we will then write a program, which monitors Twitter and listens out for trigger phrases. Whenever these trigger phrases are detected, our LEDs will light up in the different patterns we have programmed them to.

Chapter 6, An LED Laptop bag. Here we will cut and resolder an Adafruit DotStar Strip into a matrix of super-bright, controllable RGB LEDs. We will then attach this matrix to the front of a laptop bag. Next, we will hide our Pi Zero and battery pack inside the pocket of the bag and write the Python program to control our RGB LED matrix.

Chapter 7, Create Your Own pedometer. In this chapter we will make use of an Adafruit Triple-Axis Accelerometer, a Pimoroni Scroll pHAT HD, and a Pi Zero to create our own pedometer. Once we have connected the accelerometer and Scroll pHAT HD to the Pi Zero, we will write the program, which reads the data from the accelerometer and converts it into steps taken. We will then complete our program to make it display the updating step count on the Scroll pHAT HD.

Chapter 8, Create Your Own Heart Rate Monitor. With this project, we will use a Pulse Sensor Amped to create our own heart rate monitor device. We will add a Pimoroni Enviro pHAT and a Scroll pHAT HD to enable us to read the sensor data and display an animation of a heart beating in time with ours. As well as this, the device will display our heart's current BPM on the Scroll pHAT HD.

Chapter 9, Create Your Own GPS Tracker. Our final chapter will see us create a portable GPS tracker for bikers, runners or walkers to use when out and about. The GPS tracker will log your GPS coordinates, including elevation and time. We will also configure the Pi to create a file in the correct format for you to import into Google Maps or Google Earth to plot the course you have taken.