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)

Installing our software

Throughout all the projects of this book, we are going to make use of the Raspbian operating system. More specifically, we will be using the Jessie Lite version of this operating system. Raspbian is the foundation's officially supported operating system and the one for which there is most community support for. It is derived from the Debian Linux operating system; so if you have used that or any of its derivatives (like Ubuntu) before, you should feel at home with Raspbian. I have decided to go with the Jessie Lite version of Raspbian for a couple of reasons:

  1. All of our projects will run headless (without a monitor, keyboard, or mouse), so why have a display manager use up our resources?
  2. The lower footprint of this operating system, in terms of memory and storage usage, will give us access to more of the computer's resources to use for our projects.

So, head over to https://www.raspberrypi.org/downloads/raspbian/ and download the latest version of the Jessie Lite operating system. Once this ZIP archive is downloaded on your computer, you will need to copy it onto your micro SD card.

Using Etcher to copy our image

Until recently, there was a different way to copy an image file to an SD card in every different operating system; the open source piece of software, Etcher, sets out to solve this problem. Etcher is freely available for pretty much all operating systems, so we only need to document one process for all operating systems rather than detailing a different method for each OS. Etcher will run on any operating system that can run Electron. You can check the full list of supported operating systems for Electron on their website at http://electron.atom.io/docs/tutorial/supported-platforms/.

Etcher is only supported in macOS version 10.9 and higher, so if you are running a lower version of macOS, you can find other ways to install the image file on your SD card over on the Raspberry Pi site at https://www.raspberrypi.org/documentation/installation/installing-images/mac.md ; you should also probably consider getting your version of macOS upgraded too!

So, to get started with Etcher, head over to their website at https://etcher.io and download the latest version for your operating system. Run the installer as per the standard method for your operating system.

Once you have Etcher installed, open it and you should be presented with a screen like the following screenshot:

Click on the blue Select image button and browse to the Jessie Lite ZIP archive you just downloaded; there is no need to extract the ZIP archive with Etcher. You will then be presented with a screen like this:

At this point, you should insert your SD card into your computer's SD card reader. Etcher should automatically detect your SD card and progress onto the third section of the process. Click on the blue Flash! button to begin the copying process, and Etcher should display something similar to this:

If you are prompted to provide administrative credentials for Etcher to flash your SD card, then enter the required credentials and allow Etcher to complete.

You will be shown a completion estimate, the percentage copied, and the transfer rate in the Etcher window. Allow Etcher to complete this; then exit the program; and remove your SD card from your computer (no need to safely remove or eject it, Etcher has done it for you!).

You have now copied Raspbian Jessie Lite to your SD card, and you're ready to move on to our next section, Connecting to the GPIO headers.