Sechzig
Lua-scripted NeoPixel LED animations.
Please keep still and only watchen astaunished the blinkenlights.
How it Works
The ESP32 is connected to a 60-LED NeoPixel ring. The ESP32 runs a Lua interpreter that executes animation scripts to control the LEDs. It cycles through the animations, looping each animation for one minute before moving on to the next one.
The ESP32 creates a public Wi-Fi access point that hosts a web server. Users can connect to the access point and create and modify their own Lua scripts to create custom animations. The scripts are stored on a LittleFS file system on the ESP32’s internal flash memory.
The NeoPixel ring is epoxied to a piece of hardboard that is painted flat black and mounted in a poplar wood frame. The frame fits into the back of a cheap picture frame. The frame’s glass is covered with a layer of tinted film for added effect.
Writing Your Own Animations
First, connect to the “Sechzig” Wi-Fi network. Visit http://192.168.4.1 in your web browser to access the web interface.
Structure of an Animation Script
Each animation script must define a function called tick(dt)
. This function is called repeatedly to update the animation on each frame. The dt
parameter is a float representing the time in seconds since the last frame.
Example Script
function tick(dt)
gradient(0, NUM_PIXELS-1, 255, 0, 0, 0, 0, 255)
end
Helper Functions
A number of helper functions are provided to make writing animation scripts easier. Available helper functions include pixel control, color mixing, math, time, and random number generation.
Source
The source for Sechzig is available on GitHub.