Setting up your PiGlow

This tutorial will guide you through how to do some things with your PiGlow lights.

Picture of a PiGlow

First off, install the libraries for PiGlow by opening the Terminal when your Pi is connected to the internet and type:

curl https://get.pimoroni.com/piglow | bash

Screenshot of terminal

Press Enter and then type Y at each prompt, until a message appears saying All done! Enjoy your PiGlow!.

The PiGlow only uses a few pins, so it's important to make sure that they're connected correctly. The "P" on the PiGlow goes in the corner of the Pi 2 or 3 to the top left if you put the pins at the top. On a Pi Zero it's the same, turn your Pi so the pins are going across the top, then the "P" on the PiGlow goes top left.

How to connect the PiGlow

You can try out some examples now. They should have been installed when you answered yes at both prompts. The examples are written in Python, but you don't need to know Python to run them.

You can navigate through the directories on your computer using the terminal if you're happy with that or, if you're used to graphical methods, you can look in the file system for the Pimoroni folder, and inside it should be another labelled piglow. Inside there is an examples folder, in which you will find cycle.py.

Graphical screen grab

Terminal screen grab

Here are screen grabs of both methods. You only need to do it one way. In the terminal, when you're in the examples folder, you can type:

python cycle.py

and press enter. Your PiGlow will cycle through the lights until you press CTRL and c at the same time (think of it like shouting "CUT!").

If you do it the graphical way, when you double click on the cycle.py file, you get a pop up:

Choose execute in terminal

Choose Execute in Terminal and a black terminal will pop up, scrolling through the number of times the PiGlow has cycled through its lights. It will keep going until you press CTRL and c at the same time.

Now you know how to run an example, try some of the other examples provided.

There is another folder of examples, and Simon Walters (@cymplecy) has written a post about using Scratch with Piglow here.

Shopping basket

Need something for this project? You can use the links below to add products to your Pimoroni Shop basket for easy checkout.

Raspberry Pi Zero W
Zero W only £9.60
Raspberry Pi Zero W
Zero W + Adaptors £14.00
Raspberry Pi Zero W
Zero W + Adaptors + Pibow Zero W £19.00
Raspberry Pi 3 Starter Kit
£89.99
Pi Zero W Starter Kit
£35.00
PiGlow
£9.00
Raspberry Pi 3 Only
£32.00
Official Raspberry Pi Universal Power Supply
£8.00
Want to checkout or change something? Click here to view your cart.

Tutorial
Beginner
Kids, LEDs, Raspberry Pi, Pi Zero

Tanya Fish

tanya@pimoroni.com
@tanurai
http://tanyafishmakes.wordpress.com
Formerly, Tanya worked in various Sheffield schools, teaching maths and physics and shouting loudly at paperwork. Now a crew member at Pimoroni - working on learning materials for schools, workshops, and lasering anything she can get her hands on. Gets very giddy at most things STEAM.