The best tools to make your project dreams come true

Login or Signup
USD

Setting up your PiGlow

By Pimoroni

Courtesy of Pimoroni

Guide by Tanya Fish

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

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

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.

PiGlow_1

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.

libraries_2

code_3

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:

text_4

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.

Key Parts and Components

Add all Digi-Key Parts to Cart
  • 1778-1118-ND
  • 1778-1068-ND