Book Image

Raspberry Pi By Example

By : Arush Kakkar
Book Image

Raspberry Pi By Example

By: Arush Kakkar

Overview of this book

Want to put your Raspberry Pi through its paces right out of the box? This tutorial guide is designed to get you learning all the tricks of the Raspberry Pi through building complete, hands-on hardware projects. Speed through the basics and then dive right in to development! Discover that you can do almost anything with your Raspberry Pi with a taste of almost everything. Get started with Pi Gaming as you learn how to set up Minecraft, and then program your own game with the help of Pygame. Turn the Pi into your own home security system with complete guidance on setting up a webcam spy camera and OpenCV computer vision for image recognition capabilities. Get to grips with GPIO programming to make a Pi-based glowing LED system, build a complete functioning motion tracker, and more. Finally, get ready to tackle projects that push your Pi to its limits. Construct a complete Internet of Things home automation system with the Raspberry Pi to control your house via Twitter; turn your Pi into a super-computer through linking multiple boards into a cluster and then add in advanced network capabilities for super speedy processing!
Table of Contents (22 chapters)
Raspberry Pi By Example
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Installing PiGlow


The following figure shows the PiGlow board:

Since we have learned how to control an LED and a button via Raspberry Pi GPIO pins, we will now move on to a module called PiGlow, which is an add-on board for the Raspberry Pi and provides 18 individually controlled LEDs, and which you can use via a provided library. We will now proceed to install the software requirements for PiGlow by using a script provided by Pimoroni itself. To install PiGlow, run the following command in a new terminal:

curl get.pimoroni.com/piglow | bash

To check whether PiGlow has been installed properly, open a Python terminal and execute the following command:

import piglow

If it is successful, then continue.

To confirm whether I2C has been enabled, open the Raspberry Pi configuration tool by entering the following command:

sudo raspi-config

Then, select the Advanced Options menu from the displayed options.

When we enter the Advanced Options menu of raspi-config, we are greeted by the following screen...