Experiments with PiGlow 🍰 ✨

I just got the PiGlow LED display module for raspberry pi. Connected it to RPi and tried to enable the SPI and i2c buses using

sudo raspi-config

But this is what I got:

ERROR: could not insert 'spi_bcm2708': No such device

😪

Turns out that there have been some changes in the Linux kernel. From 3.18 onward, (for the arm-compiled kernel), the kernel uses “device trees”, which breaks SPI and I2C unless config changes are made 👷. Here are some posts describing the problem:

linux kernel 3.18+ breaks spi, i2c

Well it turns out that in spite of the error above, the raspi-config utility does add the required lines to /boot/config. Once that is done, follow the remaining steps as outlined here:

Setup I2C

After that is done, reboot and test if I2C is up and running by doing:

i2cdetect -y 1

and you’ll see some output of rows and columns.

For the B+ board, and all newer boards, the channel 1 is used instead of channel 0. Once I2C is setup, download the code from Pimoroni’s website. Compile it and run the example script as described!

PiGlow

Jason has a nice Python class for the PiGLow on his github page:

Jason-PiGlow

Here’s a picture of my PiGlow module:

IMG_5754