NeoPill Is an STM32-Powered NeoPixel Emulator

NeoPill uses a Blue Pill board and Python to emulate NeoPixels on a PC graphically.

Cabe Atwell
3 years agoLights / Communication

NeoPixels are great for custom lighting solutions for any number of projects, but they can be a hassle when it comes to testing different pixel patterns. Experimenting with different patterns on NeoPixels strips can be time-consuming for testing, as each change requires recompiling and reuploading the software. To that end, electronics enthusiast Randy Elwin has developed a way for users to make changes to their NeoPixel patterns and port them over in a fraction of the time. It also lets them quickly add up to 1000 NeoPixels to their projects while still changing custom patterns.

To get around that time-consuming testing issue, Elwin created an emulator that enables users to program and test their designs on a PC, then upload the changes to the NeoPixels. He created the NeoPill – a “USB bridge” of sorts designed around an STM32 Blue Pill microcontroller, a few jumpers, and a USB cable to connect the LEDs to the PC.

“NeoPill converts the NeoPixel serial data into bytes and sends those bytes to a PC over USB,” Elwin states in his project blog. “However, NeoPixel data is always written as a frame, where all the LEDs in a string are written, followed by a short pause called Data Latch. When the code running on the PC is ready for pixel data, it expects to be synced with a frame. Once synced, the pixel data streams out, and there is no other syncing involved.”

Elwin created the emulation code using Python, and while the NeoPixel library uses C++, he managed to port most functions from the library to the emulator. This allows users to copy and paste code back and forth from both platforms. Elwin has uploaded a detailed walkthrough of the NeoPill, including the necessary code, on his project page for anyone who would like to recreate his build.

Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles