Using PiGlow

PiGlow has a set of female GPIO railings, which cover the Raspberry Pi's male GPIO rails. In case of Raspberry Pi 2 and B+, the size of the railing in PiGlow is shorter, so we need to make sure that PiGlow is attached to only lower numbered pins on the Raspberry Pi.

Note

You can find out more about PiGlow on the Pimoroni website at https://shop.pimoroni.com/products/piglow.

We can now proceed to control the LEDs on the PiGlow board. Open up a Python terminal and execute the following statements in a sequential order:

import piglow
piglow.red(64)

Here, we import the particular library in Python first. The red() method selects all the red LEDs on the PiGlow board. It takes only one argument, the intensity of the LEDs, which can be a number ...

Get Raspberry Pi: Amazing Projects from Scratch now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.