Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Wearable-Tech Projects with the Raspberry Pi Zero
Wearable-Tech Projects with the Raspberry Pi Zero

Wearable-Tech Projects with the Raspberry Pi Zero: Create imaginative, real-world wearable tech projects with the Rapsberry Pi Zero

eBook
$17.99 $25.99
Paperback
$32.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Table of content icon View table of contents Preview book icon Preview Book

Wearable-Tech Projects with the Raspberry Pi Zero

About the Raspberry Pi

Throughout this book, we will be making use of the Raspberry Pi Zero computer to create our wearable-tech projects. However, before we jump straight into our first project, we should first some time getting to know the Raspberry Pi Zero computer and performing a few basic tasks, which will be useful across all of our projects. We will first look at the history of this tiny computer, and then learn how to get our software up and running, along with connecting to the GPIO headers on our computer. We will then spend some time looking at the different ways we can access our computer when it is not connected to a keyboard, mouse, or monitor and also perform some basic electronics experiments to get to know how we can use the GPIO pins in our upcoming projects.

So, let's get started!

What we will cover

In this chapter, we will cover the following topics:

  • The history of the Raspberry Pi Zero
  • The parts we will need to complete this chapter
  • Installing our operating system onto our Pi Zero
  • Different ways of connecting to our GPIO headers on our PI Zero
  • Accessing our Pi Zero in headless mode
  • Creating a very basic electronics project to familiarize ourselves with using GPIO pins on our Pi

A little history

Raspberry Pi Foundation launched the Raspberry Pi Zero on 26th November 2015, taking the IT world by surprise by releasing it secretly at a price of just $5, along with including a free Raspberry Pi Zero for those who were lucky enough to get a copy of that month's MagPie magazine. Needless to say, these tiny computers sold out quickly and, to this day, customers are still limited to purchasing just one device per order from the suppliers who stock them.

In April 2016, a new version of the Pi Zero was launched; a camera port was added to this model, enabling enthusiasts to build super small camera projects and hacks using their Raspberry Pi Zero computers.

The newest and latest version of Raspberry Pi Zero is Pi Zero W. It adds to the second generation of Pi Zero by now including the same Wi-Fi and Bluetooth on-board chip, which was introduced on Pi 3. This makes Pi Zero W a great choice of computer for our projects in this book; it has enough power to deliver what we want, and GPIO pins allow us to connect to and control all manner of devices (as we will see!); and we now have a means to connect to this computer, while it is hidden away in a piece of clothing!

With this in mind, I will be making use of Pi Zero W for all of the projects in this book. If you cannot get your hands on one, don't worry; all these projects will work fine with any Raspberry Pi computer from the model B+ upwards.

The bill of parts

We will make use of the following things in this project:

  • A Pi Zero W computer
  • A micro SD card (8 GB minimum)
  • A GPIO header set (optional)
  • Another computer or a laptop with an SD card writer
  • Internet access
  • A soldering iron and solder
  • Some Blu-Tack (or similar substance)
  • One red and one green 5 mm LED
  • Two 330 Ω resistors
  • A push type button
  • Some red and black sheathed cable

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.

Connecting to GPIO headers

For many of our projects, as we will be trying to make them as small as possible, we will probably not make use of the standard GPIO headers, which you most likely received with your Pi Zero W computer. Instead, we will be soldering our cables directly into our Pi Zero W. If you prefer to just test these projects out and would like to reuse your Pi Zero W for other projects, then it will probably make sense to sacrifice a bit of space and attach the GPIO headers to your Pi Zero W. Until recently, you only had one option to do this; solder the headers to your computer! This involves a steady hand, a keen eye, and some patience. I will talk you through this, as we are going to need to solder for many of the projects in this book; so it is a valuable skill to have even if you don't use it to attach headers to your Pi Zero. If the idea of soldering 40 very closely spaced pins onto your Pi Zero fills you with dread, you now have another option; many of the online stores stocking Raspberry Pi components now stock what are known as hammer headers. These allow you t attach the 40 small pins to the GPIO pins of your Pi Zero using only a hammer; no soldering required!

Hammer headers

You can purchase new hammer headers from a number of different retailers. Both Pimoroni (https://shop.pimoroni.com) and Pi Hut (https://thepihut.com) have them listed, and both companies ship to a wide range of countries.

If you choose to use the hammer headers, please ensure that you follow all of the instructions from the supplier or you risk irreparably damaging your Raspberry Pi computer!

Solder headers

The more traditional method of attaching your GPIO headers, and the one I have always used, is to solder them to the board. As I mentioned earlier, for most of the projects, I will not attach the header blocks in this manner and will just solder directly to the board; however, this is a skill worth learning, and some of the add-on cards or hats we will be using will require us to attach the headers before we can use them.

I include this section more for completeness about setting up a Raspberry Pi Zero, but as you will see in the projects in this book, I will be soldering our components directly to the Pi Zero and not making use of header pins. If you choose to solder the headers to your Pi Zero, then you will be able to follow the projects in the book by soldering to your header pins rather than directly doing so to the Pi.

Getting your equipment ready

You will need a soldering iron, some solder, and a blob of fixative such as Blu-Tack for this. I tend to always use leaded solder, as I find that it melts quicker and gives a better solder joint than unleaded solder, but the choice is yours.

Plug your iron in and allow it to come up to temperature. Once your iron is hot enough, apply a little solder to the tip. This is known as tinning your tip, and it fills any imperfections in your iron's tip with solder. This gives a better transfer of heat between the tip of your iron and the components your are soldering.

Now, insert the header into the Pi Zero and turn it upside down so that it is resting on the header pins evenly across the length of the Pi Zero. Then, place a blob of Blu-Tack under the side of the Pi Zero opposite the header pins, just enough to hold it flat while you begin to solder the pins, as shown here:

Now, we can begin to solder the pins to the Pi Zero; we are aiming for a nice, conical solder joint that just covers the brass ring around the hole in the Pi Zero board and comes to a point at the top of the pin. Place the tip of your soldering iron so that it touches both the brass ring on the board and the metal of the pin you are soldering, but nothing else, as shown next. Leave it for a few seconds to heat both brass ring and pin, and then apply the solder to the joint. The solder should melt, and you should see it flow into the hole and cover the brass and the pin. After a few seconds, remove the solder, and then remove your iron. Leave the joint to cool for a few seconds, and then move on to the next.

I tend to work my way down one side of the header and then rotate the Pi and solder the other side. The following picture shows what a finished soldered header should look like:

Headless access

For all of the projects in this book, we will not be connecting directly to our Pi, as it will be installed into various different objects and will need to run without a keyboard, mouse, or monitor attached. This is known as running a computer headless. To effectively do this, we need a method to connect to our Pi remotely so that we can perform the programming we need to do without having to attach bulky devices to it. This is where Pi Zero W really comes into its own; the integrated Wi-Fi means that we can connect to the Pi over a Wi-Fi network without having to add any additional hardware.

If you are using a Raspberry Pi other than Pi Zero W or Pi 3, then you will need to add a Wi-Fi dongle to your Pi to be able to connect to it remotely. If it is a Pi Zero 1.1 or 1.3 that you are using, then you will also need a USB micro shim as shown here. You can pick these up for a few pounds from many online retailers:

There are a couple of things we will need to do to get our Raspberry Pi SD card ready for remote access; fortunately the Raspberry Pi Foundation has tried to make these as straightforward as possible for us.

Enabling SSH access

We are going to use Secure Shell (SSH) to remotely connect to our Pi. As the default password of the Raspberry Pi Raspbian OS is well known, and as more and more Internet of Things devices are being made with the Raspberry Pi computers, the decision was made by the Raspberry Pi Foundation that SSH should be disabled by default, requiring a user to select to turn it on before its first use. If you are running your Pi connected to a keyboard and monitor, then this is easily done by making use of the raspi-config utility. The Foundation has also given us a way to enable SSH for those running their Raspberry Pi computers in headless mode.

To turn on SSH for a Pi that you are going to run headless, all you need to do is create an empty file (with no file extension) named SSH on the boot partition of your Pi's SD card. When you first boot your Raspberry Pi, SSH will then be enabled and the file removed from the boot partition of the SD card. As the boot partition is a FAT32 formatted partition, it can be read from and written to by any operating system. More details can be found on the official Raspberry Pi documentation: https://www.raspberrypi.org/documentation/remote-access/ssh/

Setting up your Wi-Fi network

To be able to connect to our Raspberry Pi Zero, we are going to need a working network connection. We will be using the Pi Zero W's Wi-Fi network for this. If you are using a Pi without built-in Wi-Fi, then these instructions will still work, you will just need to connect a USB Wi-Fi dongle to your Pi first.

We have been given a straightforward method of configuring our Wi-Fi connection when using our Pi in headless mode too. If we create a file called wpa_supplicant.conf in the boot partition of our Pi's SD card, upon first boot, this file is copied into the /etc/wpa_supplicant/ directory and used to configure the Wi-Fi settings for the Pi. However, this file must contain a valid set of configuration details, or your Pi will not connect to your Wi-Fi.

Here is an example of a wpa_supplicant.conf file setup to connect to the Wi-Fi network called mywifinetwork with a connection password of mypassword. You should obviously change these to match the details of your Wi-Fi network when writing your file. You can read more about the different configurations you can add to this file over at the Raspberry Pi's official documentation pages at https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md:

network={
ssid="mywifinetwork"
psk="mypassword"
}

It is worth double checking the format and details entered here, as any mistakes in this file will stop your Pi Zero from joining your wireless network.

Connecting to your Pi

Now that we have set up SSH access and our Wi-Fi network, we can start up our Pi Zero and connect to it from another computer remotely. As we are using the Jessie Lite version of Raspbian; there is no X-server to provide a desktop, therefore VNC connections are not an option. How you connect to your Pi using SSH will depend upon which operating system you are using for your computer or laptop. Once you have established a SSH connection, the steps for each future project are the same regardless of the operating system your computer is running.

Insert your SD card you previously prepared into your Pi Zero and then connect a micro USB power supply to the port labelled PWR, as shown in the following picture. All being well, you should see the green activity LED flashing as your Pi Zero boots up for the first time.

However, before we can begin to connect, you will need to discover the IP address that your Wi-Fi network has assigned to your Pi. There are a number of different ways of doing this, and the way which works for you will largely depend upon your network. The method that I usually use at home, is to connect to my home router's web interface and view the Attached Devices page. This will be different for each router and may or may not exist! My router page looks like the next picture. By default, your Raspberry Pi will show up with the host-name of RASPBERRYPI. You can change this once you get the remote access to the Pi. If you can not find out DHCP address leases from your router in this manner, then the Raspberry Pi documentation has some other methods that you can use to find the IP address of your headless Pi at https://www.raspberrypi.org/documentation/remote-access/ip-address.md:

You can see that on my router, my Pi Zero has been assigned an IP address of 192.168.1.61. Now, we know the IP address of our Pi, we can access it from our other computer or laptop.

When connecting to a host via SSH for the first time, it is normal to be warned that the authenticity of the host can not be established. If you get this warning after you have connected to a device previously, this could indicate that your SSH connection is being intercepted, or someone has changed the SSH keys on your Pi!

SSH from Windows

To connect to your Pi Zero using SSH from the a Windows operating system, you will need to download a small tool called PuTTY. This is freely available at http://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html. Download either the 32 bit or 64 bit installer, whichever is appropriate to your Windows system, and then run the installer.

Once installed, run PuTTY and enter the IP address of your Raspberry Pi into the Host Name field and click on Open, as shown in the following screenshot:

As this is your first time connecting to your Pi Zero over SSH with this PuTTY install, you will be presented with a PuTTY Security Alert window about the server's host key not being cached. This is normal, so just click on Yes. A terminal window will then open and ask you to log in. Enter pi for the username and raspberry for the password. You will then be logged in to your Pi remotely. You can now move on to the Final setup section.

Highlighting any text with your mouse in the PuTTY terminal window copies it to your Windows clipboard, and right-clicking on the PuTTY terminal window pastes the contents of your Windows clipboard into PuTTY.

SSH from macOS

To connect to your Pi Zero using SSH from the macOS operating system, you will need to use the Terminal application. You can locate this by opening finder and going to Applications and then opening the Utilities folder. Once you have located the Terminal application, double-click on it to open it. Enter the following command to connect to your Pi Zero via SSH:

ssh pi@192.168.1.61

You need to change the IP address in this code to match the IP your Pi has been assigned. You will then be presented with a warning, The authenticity of host '192.168.1.61' can't be established...—this is normal when you connect to a host for the first time over SSH, and you can safely type yes to continue connecting.

You will now be prompted to enter the password; type raspberry and press Enter. You are now connected to your Pi Zero via SSH and can move on to the Final setup section of this chapter.

SSH from Linux

To connect to your Pi Zero using SSH from a Linux operating system, you will need to use your system Terminal. Type the following command:

ssh pi@192.168.1.61

You should obviously replace the IP address with the IP address that your Pi has been assigned. As this is the first time you are connecting to your Pi over SSH from your computer, you will be asked whether you want to accept the ECDSA key fingerprint. This is normal on a first connection and nothing to worry about. Type yes and press Enter to continue connecting. You will then be prompted to enter the password for your Pi. Enter the default password of raspberry and press Enter.

When you type your password, you will not be shown any asterisks to indicate how many characters you have typed; type carefully!

You are now logged into your Pi Zero via SSH, move on to the Final Set up section of this chapter, to get your Pi ready to be used to start making our wearable-tech projects!

Final setup

Now that we have a remote connection to our Pi Zero, there are a few final setup steps to carry out so we are ready to start looking at our projects. The first thing we are going to do is to change our password to access our Pi. The default password is well known, and it is not a good idea to leave any password set as its default. Secondly, we will change the hostname of our Pi so that it is easily recognizable on our network as our Pi for these projects. Finally, we will install some of the basic software packages we are going to need for the projects in this book and also ensure that the other software already installed on the Pi is up-to-date.

Changing your password

To change your password, enter the following command into your SSH connection:

passwd

You will be asked to enter your current password (raspberry) and then asked to enter a new password twice. All being well, you should see a message like the one in the next screenshot. After changing a password over an SSH connection, I always open another SSH connection to my Pi and check whether I can successfully connect using my new password before I close the connection:

Changing the hour hostname

To change the hostname of our Pi Zero, we are going to make use of the raspi-config tool. Type the following command into your SSH connection:

sudo raspi-config

This will bring up the following menu:

Select option 2 using your cursor keys and press Enter to select it. Read and take note of the rules for allowed hostnames, and press Enter to select your new hostname. I am calling mine wearablepi. Once you have entered your new hostname, press Enter to save it. Press your Tab key twice to select <Finish> on the raspi-config menu and press Enter to close raspi-config. You will be prompted to reboot your Pi Zero. Press Enter with <Yes> selected, and your Pi Zero will reboot.

When your Pi Zero reboots, it should now show on your router's Attached Devices list, with its new hostname.

Reconnect to your Pi Zero via SSH and move onto the next section.

Downloading the example code

Detailed steps to download the code bundle are mentioned in the Preface of this book. The code bundle for the book is also hosted on GitHub at: https://github.com/PacktPublishing/Wearable-Tech-Projects-with-the-Raspberry-Pi-Zero. We also have other code bundles from our rich catalog of books and videos available at: https://github.com/PacktPublishing/. Check them out!

Installing basic software

We now need to update our existing software and install a few more bits of software ready for our projects. To update our existing software, type the following command into your Pi Zero:

sudo apt-get update

You should see multiple lines of information appear across your SSH connection, as your Pi Zero updates its information about what software packages are available to it:

To upgrade your existing software packages, type the following command:

sudo apt-get dist-upgrade

This command will make your Pi Zero check to see whether there are any updated software packages available for you to install. If there are, it will ask you to confirm. If prompted to, press Y to install your updates and wait for the process to complete.

We are now going to install a couple of new pieces of software, which do not come as standard on the Jessie Lite image, but this we will need for our projects. Type the following code to install the required software:

sudo apt-get install python3 python3-gpiozero python3-pip

Your Pi Zero will then calculate all the other packages it needs to install to get these three pieces of software working. Enter Y and press Enter to begin the installation process. Installing new software and updates on a Pi Zero can take some time, but be patient and it will finish soon enough!

Once this completes, we now have the basic software we need to start on our projects.

Basic electronics

In this section, we will wire up a simple push button, LEDs, resistors to our Pi Zero, and then write some simple Python code that will respond to a user pushing the button and making our LEDs flash.

Wiring up the electronics

We need to wire up our electronic parts, as shown in the following image:

Make sure that your Pi Zero is switched off when you are soldering the cables to the Pi or the header pins! You will also need to take care when wiring your LEDs, as we must get the correct legs attached to the positive and negative wires in our circuit, or they will not work. The positive leg of an LED is usually longer, and there is often a flat edge on the LED to indicate which is the negative leg. We are also going to introduce a 330 Ω resistor between the LED and the ground of the Pi; this is done to stop the LED drawing too much current from the Pi and damaging it.

You may want to introduce a little electrical insulating tape around one leg of each LED to ensure that they do not short circuit by touching the other leg. Once you have soldered your components together, give them a final check over to make sure they are in the correct GPIO holes on the Pi and that you have a good connection at each joint.

Now that we have completed the wiring of our electronics, we can move on to writing the code to control it all. Plug in your Pi and establish a SSH connection to it.

Writing the Python program

We will make use of the Nano text editor to write our Python files. First, we will create a directory to save all of our programs into. Type the following two commands:

mkdir ~/WearableTech
cd ~/WearableTech

We should now be inside our new WearableTech directory. Type the following command to open Nano, and create a new file called ledflash.py:

nano ledflash.py

We are now in the Nano text editor. Type in the following code to create a simple program, which will make the LEDs flash on and off when you press the button, and then stop the LEDs flashing when you press the button again:

#!/usr/bin/python3
from gpiozero import LED, Button

btn = Button(25)
green = LED(23)
red = LED(14)

while True:
btn.wait_for_press()
green.blink(0.5,0.5)
red.blink(0.25,0.25)
btn.wait_for_press()
green.off()
red.off()

Save the file by pressing Ctrl and O together, followed by the Enter key, and then exit Nano by pressing Ctrl and X together. We are now going to make the file executable by typing the following command:

sudo chmod +x ./ledflash.py

We can now run the file by typing this:

./ledflash.py

All being well, you should now be able to press the button wired up to your Pi and LEDs should start blinking at different rates. Press the button again (you may need to hold it for half a second) and your LEDs should switch off! If it doesn't work, check your program and double check your wiring.

If you want to stop your program from running, press Ctrl and C together.

Breaking down the program

The first line of the program is what is known as a shebang. The hash symbol followed by an exclamation mark (#!) tells the computer that what follows the exclamation mark is the details of what the program or interpreter should be used to run the rest of the program. In our case, this is python3, which is located inside the /usr/bin directories. Next, we import two things from the gpiozero library, Button and LED.

The next section of the code deals with setting up our devices. We create a variable, called btn, and tell Python that it is a gpiozero library's Button attached to GPIO pin number 25. We then create a variable for each LED and tell Python that they are gpiozero LEDs attached to pins 23 and 14.

Now, we enter the main part of the program. We start a while loop and just pass True as our condition to the loop; this will mean that this loop never ends (unless you close the program by pressing Ctrl and C together).

Now, we instruct Python to wait until it detects a press of the button. When it detects a press, we move on to the next line of the program. Here, we set each LED to blink on and off at different rates. The blink class of the gpiozero LED defaults to running the blink as a background thread; this means that the blink starts, and then we move onto the next line of code with the blink still running. So, with both LEDs blinking away, we wait again for a button press. When this is detected, we turn off each LED, and then return to the beginning of the loop.

Play around with the program and have a read of what else you can do using the gpiozero library on the documentation pages at https://gpiozero.readthedocs.io/en/stable/.

In the next chapter, we will get straight into a wearable-tech project using many of the things we have done in this chapter. At this point, you can shut down your Pi and desolder the six cables from it if you like; we will be using some different hardware for the next project!

Summary

In this chapter, you have learned a little bit about the history of Raspberry Pi Zero as well as how to set up Pi Zero from the scratch, including installing the operating system on our SD card and setting up remote access to it for our network.

We then spent some time creating a simple electronic project to get comfortable with some electronics we will be using, along with some of the Python libraries we will be using to control them.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • A practical and imaginative guide that exposes you to amazing wearable-tech projects
  • Create our own heart-rate monitor device and cool projects such as a Tweet-activated LED T-shirt
  • A practical guide packed with real-world, useful wearable-tech projects

Description

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!

Who is this book for?

Everyone. While some prior knowledge of Python programming and use of the terminal on the Raspberry Pi would be advantageous, they are by no means necessary. Each chapter clearly sets the steps to be taken on your wearable-tech adventure. The first chapter assumes no prior knowledge to get your Pi Zero and you, up and running. The complexity of the electronic devices used, progress incrementally as you work through the chapters; there are clear steps to follow and pictures to help you at every turn along the way.

What you will learn

  • • Make use of your Raspberry Pi Zero to create wearable-tech projects
  • • Interface with electronic devices and use Python to control them; incorporate these into real-world, practical, wearable-tech projects
  • • Add LED devices to clothing and connect them to your Pi Zero
  • • Change how LEDs react based upon your movement or messages sent through Twitter
  • • Create a pedometer and heart rate monitor
  • • Create your own GPS tracker
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jul 14, 2017
Length: 184 pages
Edition : 1st
Language : English
ISBN-13 : 9781786468819
Vendor :
Raspberry Pi
Category :
Languages :
Concepts :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Publication date : Jul 14, 2017
Length: 184 pages
Edition : 1st
Language : English
ISBN-13 : 9781786468819
Vendor :
Raspberry Pi
Category :
Languages :
Concepts :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 110.97
Raspberry Pi 3 Home Automation Projects
$38.99
Raspberry Pi Zero W Wireless Projects
$38.99
Wearable-Tech Projects with the Raspberry Pi Zero
$32.99
Total $ 110.97 Stars icon

Table of Contents

9 Chapters
About the Raspberry Pi Chevron down icon Chevron up icon
Scrolling LED Badge Chevron down icon Chevron up icon
Sewable LEDs in Clothing Chevron down icon Chevron up icon
A Motion-Reactive LED Cap Chevron down icon Chevron up icon
A Tweet-Activated LED T-Shirt Chevron down icon Chevron up icon
An LED Laptop Bag Chevron down icon Chevron up icon
Creating Your Own Pedometer Chevron down icon Chevron up icon
Creating Your Own Heart Rate Monitor Chevron down icon Chevron up icon
Creating Your Own GPS Tracker Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.5
(2 Ratings)
5 star 50%
4 star 50%
3 star 0%
2 star 0%
1 star 0%
Anne Feb 23, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I'm really enjoying working through this book and have completed a wearable tech item. I have read to the end of Chapter 3 so far and the explanations have been very clear.
Amazon Verified review Amazon
P. Brown Sep 16, 2017
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Great book with well thought out and written projects. Glad i purchased it.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela