My Colour Changing Icosahedron Quilt is my Coding Playground

Russell Eveleigh
Sep 30 · 6 min read

This quilted icosahedron is packed with 180 RGB LEDs and a pair of speakers, all controlled by a Raspberry Pi. I made it as a learning project and Python playground and as an experiment in light diffusion.

A learning project

I like the idea of hiding light sources in places you wouldn’t expect, especially behind fabrics. I would love to make a stealthy light up fraction wall, or 100 square, which could hang unassuming in my classroom ready to sparkle into life as a teaching aid. This icosahedron project gave me a chance to answer some questions and clear some learning barriers before taking on more complex projects: would I be able to solder, power and program nearly 200 pixels? Is a quilt and cardboard combination a good way to partition LED groups and diffuse light sufficiently?

icosahedron printed and set out on a table
icosahedron printed and set out on a table
The icosahedron is printed on a heavy (350gsm) Jersey fabric

I had the icosahedron logo printed on a heavy Jersey fabric, and hoped the thick lines in the design would help prevent light from bleeding between sections. Hey, another time I’ll proper piece a quilt together, but as this was all an experiment I was happy to cheat with a printed picture and just quilt tramlines along each line to help further divide each section.

I commandeered a panel of my cardboard Planetarium and built a frame with a depth of 2cm. Wood may be a more obvious choice for this purpose, but double walled cardboard certainly seemed rigid enough to support electronics. I carefully followed the lines in the print to assemble the icosahedron centre piece.

Cardboard frame with lights behind
Cardboard frame with lights behind
Bare cardboard frame ready for quilt top

Powering the LEDs, Speakers and Raspberry Pi

I had also expected a far bigger current draw too — 180 LEDs x 60 milliamps equating to nearly 11 amps in total — but even at full brightness, the lights drew less than 6 amps.

Throwing the quilt roughly over the cardboard frame, showed promising illumination and a potential for even light diffusion.

I powered the LEDs and the Raspberry Pi with a single 10amp power supply, for once ensuring that there was a suitable capacitor across the positive and negative terminals. To connect the Pi, I cut into a USB cable and inserted the powered wires into the same terminal block as the LEDs.

After playing with the strips, and confirming that the same old Circuit Python code would work as well with 180 LEDs as it had with the NeoPixel rings, I began to snip and group the LEDs into sections. Cutting straight through the copper terminals and stripping wires was child’s play, but soldering proved to be tortuous at first. I knew that this was a necessary endeavour however if I wanted to improve, and eventually I found my groove with a series of not terrible joins.

Soldering: my nemesis

I attached the LEDs to the cardboard with thin double sided tape, but in most cases I found that hot glue was also needed. The mass of disconnected wires poking through holes made the back look like some kind of desolate battleground and so it was extremely satisfying to restore order by using heat shrink to connect each section to the next.

The chain of LEDs starts in the centre with each triangle lit with between three and seven lights, then continues around the outside of the hexagon piece — it’s the light from these ‘inner’ LEDs that shines through the fabric. The remaining lights extend the chain behind the frame to create back lighting. The data wire runs directly from the Pi through each NeoPixel right through to the last one, but I connected the power source to three different points along the chain which took care of the voltage drop, minimal as it was.

Cardboard frame lit with red LEDs
Cardboard frame lit with red LEDs
LEDs mark illuminate each section

I am hoping to learn more about coordinating lights with sound, and so I bought cheap Adafruit speakers to embed in the cardboard frame. I naively thought that I’d just be able to connect them to a 3.5mm jack and plug them into the Raspberry Pi, but when I did so the the resulting sound was almost inaudible. However, when connected to a USB digital to analogue converter, I found the speakers to have slightly more oomph, and it was clear that with a half decent set of speakers it would work well. In fact, the AudioQuest DragonFly USB stick, which was generously passed on to me by an audiophile neighbour, turned out to be a premium audio device, as you may hear (if you watch the video) when connected to my living room speakers.

Using Circuit Python, each LED can be programmed with red, green and blue values — it is easy to set a colour for the whole thing and even without the fabric this looked very cool. With a few simple Python functions, it is also possible to loop through all LEDs in a section and set a colour.

def centre(r,g,b):
for x in range(0, 7):
pixels[x] = (r,g,b)

When the frame was placed against the wall, the back lighting looked effective — even during the day and without the quilt top.

Satisfied that the lights were working well, and that nothing had caught fire, I set about carefully putting the quilt cover in position on the frame. I trimmed the excess fabric, folded the edges over and stuck them to the cardboard with packaging tape. On flipping it over, I was impressed with its final appearance, and my first experiments showed that the light doesn’t bleed between sections.

Music Synchronisation


A sandbox for future learning

The quilt is also a sandbox for future experiments with IoT, MQTT, Flask and controlling physical devices from webservers, as well as a chance to tip my toes into a pool of Arduino devices. Perhaps my quilt could become my own upbeat smart speaker, or I could connect it to my doorbell like Bitluni’s lamp.

As a learning project, this RGB icosahedron quilt had been perfect. It’s helped me get a better understanding of what’s possible!

Age of Awareness

Medium’s largest publication dedicated to education reform | Listen to our podcast at

Age of Awareness

Stories providing creative, innovative, and sustainable changes to the ways we learn | Tune in at | Connecting 500k+ monthly readers with 1,200+ authors

Russell Eveleigh

Written by

A primary school teacher and family man in the UK who likes tinkering with code and who sometimes tries to write good.

Age of Awareness

Stories providing creative, innovative, and sustainable changes to the ways we learn | Tune in at | Connecting 500k+ monthly readers with 1,200+ authors