Christmas Lights!


#1

Well, it was a Hack Friday on Dec 1st, and I had this spare string of WS2812 NeoPixel LEDs. What happened next is obvious.

Except I didn’t have time to write it up, so here I am keeping a weekend eye on support and writing up my new Christmas lights. I also promised to ping @sonyagreen when I published, because she wants a set, and will hopefully have better pictures.

Repo

I used

  • A string of WS2812 lights.
  • A Hack Friday on Dec 1st.
  • An RPi Zero Wireless and a PiBow case.
  • Not quite enough time to write it up.
  • resin.io, etcher, etc. My standard IOT toolchain.
  • The rpi-ws281x-native, color and lodash npm libraries.

Wiring

The wiring for this project is really easy.

  • GPIO 18 (library default) to Data In of the WS2812 string
  • An independant 3.3v power supply to provide the amperage
  • Connect the +ve of the power supply to the string
  • Share the 0v of the power supply with the Pi

Software

The software was also fairly simple. My thanks to some great libraries.

  • The top block imports the three libraries
  • Then I parse the environment and initialise some global variables and library bits
  • Then I populate the internal array representing the LED string with white
  • Then I set up a render loop that simply pushes the relevant part of the array to the library
  • Then I start the fade of a LED every once in a while
  • Then I deal with each step of the fade

Controlling an LED strip with Rpi 3 B+
#2

Circuit Board Christmas Tree

Oh PCB, Oh PCB

How festive are your diodes

Materials

Hardware

My usage, and so the photo, shows some different components. In all honesty I’ve got several half-finished starter boxes that I keep pulling bits out of for projects. I think that the list is complete enough - but also welcome Pull Requests if not.

Software

Installation

Hardware

  1. Solder the headers onto the Pi
  2. Put the Pi into the case
  3. Snip out the PCB and push the largest panel onto the Pi
  4. Push the other two panels onto the PCB

Software

  1. Create a new app in your resin.io account
  2. Download and etch the resinOS for this app
  3. Replicate this repo into that app, git has several ways to do this
  4. Insert the microSD and power up

Expected behaviour

  1. As the device boots all of the lights ought to shine for a second or two, as a hardware test (Leds.init())
  2. Then a number of lights equal to the number of days through advent should flicker (Leds.step())

#3

So, my son’s birthday was yesterday, which means today the decorations actually go up, which means that there’s a brief update to this project!
I also note that there’s another device listed in the application, I think @sonyagreen might have been deploying her fleet of decorations.


Node bus error [continuous socket hangups]