Wiring LEDs and Prerequisites - AlbertGBarber/PixelSpork GitHub Wiki

On this page I'll go over the hardware you need to start running the code in the Start Guide examples.

What You'll Need:

To setup a strip of addressable LEDs, you'll generally need four things:

  1. Some addressable LEDs. These can be any of the types supported by FastLED. For all the examples in the wiki/library, I'll assume that you're using WS21811/12 series of LEDs. The examples are all built around a strip of 60 LEDs, although you can use whatever number you like, with a minimum of 12 (below which, it's hard to see what's happening in some of the examples).

  2. A micro-controller that is supported by FastLED (except ATtiny's). Pixel Spork uses Fast LED to write data to your addressable LEDs, so it will only work with FastLED compatible micro-controllers. Keep in mind that Pixel Spork is a large, performance intensive library, so while it can run on your classic 8-bit Arduino Uno, I recommend using a more robust 32-bit controller such as an Teensy 3.0+, ESP8266, or ESP32. I personally use a Wemos D1 Mini, an ESP8266 based micro-controller, for most of my testing.

    Note that for the ESP8266, ESP32, and any other 3.3V based micro-controller, you may need a logic level shifter to control the LEDs. I recommend using a 74ACHT125, which I have a breakout board for here (or you can just use a breadboard...). You can also try this if your LED setup allows it. You can read more about level shifting LEDs here.

  3. A power supply. The maximum current needed for a WS2812 LED at full brightness is about 60ma. This may not seem like much, but it adds up fast. A typical 5m strip with 60LEDs/m (300 LEDs total) can in theory draw 18A!!! Granted, that's when running all the LEDs at pure white and max brightness, which is something you're unlikely to do, but you still need to be aware of the potential draw. Overall, when working with addressable LEDs, you'll usually want a dedicated power supply for them. This can be something as basic as a 2-3A 5 or 12V wall-adapter, but you should avoid powering your LEDs directly from your micro-controller, especially if you're new. Keep in mind that FastLED has a built in power limiting function, but this should be a fall-back, and not your primary safety feature.

  4. A computer with the Arduino IDE installed. Like FastLED, Pixel Spork is programmed using the Arduino IDE. You can install the library by searching for "Pixel Spork" in the IDE's library manager, or via the .zip file from the latest release. For more info, see the Arduino library installation docs. You'll also need to install the FastLED library in a similar fashion. Before you try a Pixel Spork program, ensure you can upload to you micro-controller by using the basic Arduino "blink" example.

Wiring and Connecting LEDs:

Connecting your LEDs to your micro-controller with Pixel Spork is no different than when using any other addressable pixel library. There are already a bunch of great guides for wiring you pixels, so I'll direct you to them instead: