Fun! It's amazing how ubiquitous WS2812Bs have become in such a short time. They're wonderful for everything from wearables to signage to room lighting, and there are 12V versions available if you want to drive longer strings.
Some advice for people seeing this article in 2020: you might consider using a more modern microcontroller which supports DMA for new projects today. The ATMega328p which is used in Arduino Unos and Nanos is a reliable workhorse, but it's also slow and expensive compared to modern 32-bit MCUs.
Check out ESP8266/ESP32 or ARM Cortex-M cores. They're fast enough to make buttery-smooth animations, they have enough memory for thousands of LEDs, and DMA lets you set up a continuous data transfer to the LEDs which does not require CPU time. These days, there are plenty of ARM Cortex-M boards which work with the Arduino IDE while still being a hair cheaper than "Arduino" knock-offs, and ESP8266 boards let you control your patterns over WiFi.
If you're starting to learn about embedded development today, it's not a bad idea to start with more modern hardware; projects like MicroPython and Arduino support a wide variety of chips.
Also, if you use the Arduino IDE and appreciate their work, consider buying a genuine Arduino Nano. They cost a bit more than $3-5:
Thank you for this post! When I started, I didn't realize how low powered these nanos are. I spent forever getting the variables under 1.1kb but I just discovered the teensy 4.0 that supports 1000x as much memory and 30x the processor speed.
I am still glad I started with the nano because it got me to refactor my code and make it memory efficient.
Well, congratulations - it's an impressive project! Putting things together in a sturdy way that looks nice is the hard part. Thanks to all of the free libraries and IDEs, the hardware and software are practically an afterthought these days :)
I'm a big fan of the STMicro nucleo L476RG. Multiple UARTS and SPIs, really low power, custom clocking and deep-sleep modes, 32x the flash of an Uno, and up to 80MHz. Comes in $13 arduino-like board, or a smaller $8 version like an Arduino micro.
The "BluePill" (STM32F103) is also good, really small and pretty cheap if you don't need the Arduino compatibility. You will need a dedicated programming tool (ST-Link), though. At least that's what I use for more than half of my WS2812B related projects.
I totally understand why one might want to buy "genuine Arduino" parts to support the company doing the work to shape that hardware/software ecosystem, but is there a point at which it's reasonable to acknowledge that the price increase over compatible Chinese knockoffs isn't worth paying? I mean, that Nano is $22 from them, which is like a 600% markup over the identically functional cheapo ones you can get on Chinese eBay.
If you want maximum number of LEDs, I think you want the four-wire LED strips that are driven over SPI, like the APA102 and similar. Much faster than bit-banging on the three-wire strips.
You can find how to control them if you search for HUB75. For a couple of dollars you got 2048 LEDS. You can get them in different sizes and LED pitches.
Yes, at least in this application. You technically need a level shifter since the teensy has 3.3V output, but if you are running the strip at 4.5V, the output of the Teensy will just barely meet the spec. If you run the strip at a higher voltage you can run into problems.
I saw one of these last night at a show. It was pretty cool, but thought it was a little confusing to see so many rave masks (led and non-led) among so many surgical masks on sock people. We need LED rave surgical masks!
This seems an appropriate time to mention Shobaleader One, Squarepusher's live project, as their stage gear is a sort of Kendo uniform with a full-face LED matrix.
The masks don't look quite as impressive in the video[0], but live it was incredible. The LEDs can react to volume, but additionally they were synced into preprogrammed routines to fit the music, and with very little other light on stage it was mesmerising.
This is cool project, the effects look great! makes me think of 'Ruiner' computer game, the main character had an animated mask set in a cyberpunk world.
Because C++ is huge language with lot of history baggage that makes it easy to write bad code. I'd love to use something more elegant like Nim (with disabled GC). Note that only lowest layer of embedded project has to have direct access to memory mapped devices and for this I still prefer C.
Some advice for people seeing this article in 2020: you might consider using a more modern microcontroller which supports DMA for new projects today. The ATMega328p which is used in Arduino Unos and Nanos is a reliable workhorse, but it's also slow and expensive compared to modern 32-bit MCUs.
Check out ESP8266/ESP32 or ARM Cortex-M cores. They're fast enough to make buttery-smooth animations, they have enough memory for thousands of LEDs, and DMA lets you set up a continuous data transfer to the LEDs which does not require CPU time. These days, there are plenty of ARM Cortex-M boards which work with the Arduino IDE while still being a hair cheaper than "Arduino" knock-offs, and ESP8266 boards let you control your patterns over WiFi.
If you're starting to learn about embedded development today, it's not a bad idea to start with more modern hardware; projects like MicroPython and Arduino support a wide variety of chips.
Also, if you use the Arduino IDE and appreciate their work, consider buying a genuine Arduino Nano. They cost a bit more than $3-5:
https://store.arduino.cc/usa/arduino-nano