Bright and Shiny Things: Programming with LED’s

Teaching programming using the LED light strips is going much better than expected. I tried it with the 9th grade Algebra class during our weekly programming session using a set of coding lessons I put together. I went so well that though we started by having everyone (about 10 kids) share two LED strips, by the end of the year I had three students from that class build their own.

Student built LED strip.
Student’s LED strip on a sword. The battery can power it for at least 15 minutes.

The coding lessons are still a work in progress, but it has them learn the basics by running some of the test programs, then then explore sequences using for loops. There are a lot of directions to branch off after the for loops. I’ve had some of my Algebra II students make static patterns using linear and exponential functions, while a couple of the kids in my programming class used different functions to make dynamic lighting patterns; our hydroponic system (see here and here) now has a neat LED indicator that runs different sequences depending on if the pumps are running or not.

Some of the students who built their LED strips in the Makerspace posted about their projects: LED Thingy and LED Light Strip Project. The process (rpi-led-strip) is not too hard but required them to be able to do a little physical computing (with Raspberry Pi’s), use ssh and terminal commands (terminal instructions), and then run and write python programs.

Raspberry Pi that controls one of the LED strips from a student’s project.

Since the setup uses the same GitHub repository (rpi-led-strip) it’s also easy to update some of our existing projects like the Wall Anchor.

Wall anchor project.

I am amazed at how much the students have engaged with what are, ultimately, very simple systems (a Raspberry Pi and a strip of 20 lights), and I’m really excited to see where it takes us.

Leave a Reply