Book Image

Raspberry Pi Zero Cookbook

Book Image

Raspberry Pi Zero Cookbook

Overview of this book

The Raspberry Pi Zero, one of the most inexpensive, fully-functional computers available, is a powerful and revolutionary product developed by the Raspberry Pi Foundation. The Raspberry Pi Zero opens up a new world for the makers out there. This book will give you expertise with the Raspberry Pi Zero, providing all the necessary recipes that will get you up and running. In this book, you will learn how to prepare your own circuits rather than buying the expensive add–ons available in the market. We start by showing you how to set up and manage the Pi Zero and then move on to configuring the hardware, running it with Linux, and programming it with Python scripts. Later, we integrate the Raspberry Pi Zero with sensors, motors, and other hardware. You will also get hands-on with interesting projects in media centers, IoT, and more.
Table of Contents (17 chapters)
Raspberry Pi Zero Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Heartrate monitoring wearable device


The Raspberry Pi Zero is small enough that you could bring it with you, power it, and attach monitors without the need to be directly connected to anything. Using the MQTT protocol, we can communicate whenever the network is available, as long as we have a running broker available.

Getting ready

You'll need your Raspberry Pi Zero running Raspbian, an MCP3008 ADC, and a Pulse Sensor. A popular and inexpensive open source pulse sensor is available at http://pulsesensor.com/.

This is really another recipe that could use its own Raspberry Pi; with a small USB battery pack, this would be easy to incorporate into a wearable to keep track of your pulse throughout the day.

If you want to publish to your OpenHAB MQTT broker, you'll want to have an OpenHAB instance as shown in the Setting up your hardware for home Automation recipe. Finally, you'll want a Mosquitto broker running somewhere (which works fine on your OpenHAB instance), but you can install it on any available...