All Projects → zranger1 → PixelblazePatterns

zranger1 / PixelblazePatterns

Licence: other
Patterns for the Pixelblaze addressable LED controller

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to PixelblazePatterns

smart-lights
Cloud-Controlled house lights using home-grown electronics and 3D printed light switch covers
Stars: ✭ 18 (+0%)
Mutual labels:  lights
akbl
Control the lights of Alienware computers under GNU/Linux systems.
Stars: ✭ 99 (+450%)
Mutual labels:  lights
Luven
Minimalist lighting engine for Löve2D
Stars: ✭ 37 (+105.56%)
Mutual labels:  lights
Rc Engine Sound ESP32
Allows to play vehicle engine sounds on an ESP32. Additional sounds can play in parallel with the engine sound! Controls your lights as well. compatible with SBUS, IBUS, PWM, PPM and SUMD signals.
Stars: ✭ 139 (+672.22%)
Mutual labels:  lights
update lights
This AppDaemon app progressively changes the brightness and color temperature of lights over the course of the day. This app also uses change thresholds to ignore lights that have been manually adjusted.
Stars: ✭ 16 (-11.11%)
Mutual labels:  lights
nanoleaves
CLI and api client for the Nanoleaf Aurora light panels.
Stars: ✭ 28 (+55.56%)
Mutual labels:  lights
HueLightDJ
Hue Light DJ using Hue Entertainment API
Stars: ✭ 54 (+200%)
Mutual labels:  lights
tuya-local
Local support for Tuya devices in Home Assistant
Stars: ✭ 150 (+733.33%)
Mutual labels:  lights
ad-automoli
💡 Fully automatic light management based on conditions like motion, illuminance, humidity, and other clever features
Stars: ✭ 99 (+450%)
Mutual labels:  lights
lifelights
Video games blended with home automation. Control your IoT devices based on in-game statuses!
Stars: ✭ 80 (+344.44%)
Mutual labels:  lights
hueplusplus
A simple C++ library to control Philips Hue lights on Linux, MacOS, Windows, Espressif ESP32 SDK and Arduino. Full documentation at
Stars: ✭ 48 (+166.67%)
Mutual labels:  lights
Super-Simple-RGB-WiFi-Lamp
A project based on the ESP8266 and WS2812b
Stars: ✭ 61 (+238.89%)
Mutual labels:  lights
jarvis
Jarvis Home Automation
Stars: ✭ 81 (+350%)
Mutual labels:  lights

PixelblazePatterns

Patterns for Pixelblaze LED controller

NOTE: Library restructuring in progress! I've got enough patterns that keeping them in a single folder no longer made sense. For now:

  • 1D patterns (for linear strips) are in the 1D folder
  • 2D and 3D patterns are in the 2D_and_3D folder
  • Experiments and works-in-progress are in the Experimental folder
  • The multisegment pattern and related things have been moved to their own folder in this repository: Multisegment
  • Shader and signed distance has been moved to its own repository, here: SDF-LED Repository

I'll be revising and improving this directory listing as I go. For now, I've left the list of patterns alone-- you can probably figure out from the descriptions which folder they are currently in. -Z


matrixgreenwaterfall.js

Basic green "The Matrix"-style waterfall display adapted for 2D LED displays.

Not a perfect reproduction but it looks good, and it's fast and lightweight enough to be usable as a background or a texture in another pattern.

Video: https://youtu.be/pOs0UX_w7PI

spinwheel2d.js

A fast, colorful, flowerlike radial spinner. Yet another example of the complex and unpredictible things that result when you combine a few simple waveforms.

Video: https://youtu.be/L-d-PPknVlM

rgbplasma2d.js

Simple, brightly colored additive sine/cosine plasma with sliders to control noise scale and density. Built from a GLSL prototype just to see if a Pixelblaze 3 can manage the trig mostly the same way. Spoiler: It can!

snowflakenova2d.js

Started life as a snowflake generator, but turned into more of a psychedelic snowflake kaleidoscope thing...

Simulates the "fold and cut random holes with scissors" snowflake making method, which works in a strange and interesting way at the low spatial resolution of LED displays.

Requires a 2D display and appropriate mapping function. Best with some sort of diffuser over the display.

icefloes2d.js

A river filled with floating ice! Uses Voronoi distance to simulate blocks of ice drifting and turning in the current.

Requires a 2D display and appropriate mapping function.

timeflies2d.js

"Time flies like an arrow. Fruit flies like a banana..." Many small bugs with flapping wings -- food for Jeff's excellent Snake 2D:

https://forum.electromage.com/t/task-8-serpentine-square/1088/7

Uses a similar additive wave noise generator to control movement. Requires a 2D display and appropriate mapping function.

rosecurve2d.js

Interactive "rose" or rhodonea curve display.

https://en.wikipedia.org/wiki/Rose_(mathematics)

N and D sliders control angular frequency. The wikipedia article has a figure illustrating the many types of curves that these settings will produce.

Requires a 2D LED array and appropriate pixel mapper.

doomfire2d.js

New: Updated to v1.0.1 w/more flame, better wind.

Realistic 2D Fire effect, with "enhanced" dragon's breath mode. Looks best with a diffuser, but quite fiery in any case. Uses a convolution algorithm inspired by the low-res fire in the prehistoric PSX port of DOOM! See code comments for details.

Video: https://youtu.be/_LuZJvVMEqE

Requires a 2D display and appropriate mapping function.

cycliccellularautomata2d.js

Displays a cyclic cellular automaton, and a variant of the Greenberg-Hastings CCA:

https://en.wikipedia.org/wiki/Greenberg%E2%80%93Hastings_cellular_automaton

This flavor of CA is used to model "excitable" systems -- a system that can activate, and support the passage of a wave of some sort, after which it must "rest" for some period of time before another wave can pass.

A forest fire is the canonical example of this kind of system...

Video: https://youtu.be/VIBBHW_6eio

Cells are randomly initialized according to the current mode and parameter set. Some initial condition sets may "fizzle" and die out. If this occurs, the pattern will automatically re-initialize.

The default settings produce mostly "good" results, but this pattern rewards experimentation and a bit of patient watching. It can produce beautiful visuals that would be near impossible to make any other way!

Requires a 2D LED array and appropriate pixel mapper.

infinityflower.js

Generates and displays a new flower species every couple of seconds.

Video: https://youtu.be/7lAhRjhJCmc

Requires a 2D LED array and appropriate pixel mapper.

raindrops2d.js

Top down view of rain falling on a pool. You control the rain intensity via Web UI. Very relaxing to watch, best viewed from a few feet away from your display.

Video: https://youtu.be/Wl4LOqAQ3ro

Requires a 2D LED array and appropriate (2D) pixel mapper.

sunrise2d.js

2D sunrise/solar activity simulator - an animated sun rises and shines. Plenty of surface activity, plus dynamic, particle-system based corona and solar flares.

Move the UI slider to see the sunrise again!

Requires a 2D LED array and appropriate (2D) pixel mapper.

nbodygravity2D.js

A 2D n-body gravity simulator. As you'd expect, large numbers of particles at high gravity tend to collapse and merge. Lower the gravity a bit, and they'll fly free again.

Requires a 2D LED array and appropriate (2D) pixel mapper.

conwaysllife2d.js

Conway's classic "Game of Life" cellular automaton.

Requires a 2D LED array and appropriate (2D) pixel mapper.

multisegmentforautomation.js

"Industrial Strength" version of the multisegment pattern that only works with home automation controllers. All setup and control is done via the websockets interface. There is no Web UI. If you have a home automation system that supports it, like the Hubitat Elevation, this is the multisegment pattern you want. See the setup guide, MULTISEG_HA.md for full instructions and lists of settings and effects.

Video: https://youtu.be/4-5qdCpFFfE

multisegmentdemo.js

Demonstration/testbed for the multisegment pattern, with Pixelblaze Web UI controls. If you don't have a home automation system and/or just want to see what the multisegment pattern can do, this is the one to try! Again, See the setup guide, MULTISEG_HA.md for full instructions and lists of settings and effects.

voronoimix2D.js

Draws a bunch of colorful, animated Voronoi distance related patterns. Lots of UI controls -- this one is an experimental testbed, meant for exploration and play.

Video: https://youtu.be/EozPJG5OvQ8

rule30flasher.js

A computational toy. Demonstrates how to use the center column of a cellular automaton running Wolfram's Rule 30 to generate a high quality stream of random bits. Makes pretty blinking lights too.

mandelbrot2D.js

Displays an animated view into the Mandelbrot set on a 2D display. This is very much a work-in-progress. I'll be optimizing and improving for a while, but it's reached the point where it's fun to watch, so here it is!

Video: https://youtu.be/V2dlac4WSic

bouncer3D.js

Says "3D", but works on both 2D and 3D displays!

Bounces from 1 to 20 balls around a 2D or 3D display. Sliders let you set object count, size and speed. In 3D, it looks best on volumetric objects.

This started as a proof-of-concept for a set of vector utilities, but it turned out interesting enough to stand on its own as a pattern.

Because of the way it is optimized, performance goes down, as you'd expect with number of objects. But it can go back up as you increase object size. There's some fun to be had playing with these parameters to maximize frame rate for a given number of objects.

Video (2D): https://youtu.be/tjvoOpJCxtQ

oasis.js

Peaceful light dances on waves of green and blue.

A quiet space to rest and reflect on what we've lost in this strangest of years, and to remember the beauty that remains, and the tasks that must still be begun and finished...

Inspired by FASTLed's Pacifica effect

Video: https://youtu.be/CAHAIPlc2Gs

(updated to 1.0.2 on 11/30/2020 --Better wavelength adjustment to strip size, and additional UI controls)

linesplash.js

Creates "waves", drawn as a line on a 2D LED matrix, by randomly dropping objects from random heights into a linear "pond".

This pattern is fallout from an experiment in using easy-to=compute parts to create a complex, chaotic-seeming result. For performance reasons, it's actually built using a simple system of virtual "springs", rather than actual fluid dynamics.

Requires a 2D display and appropriate pixel mapper. Note that you MUST set your display dimensions in the pattern code for things to work correctly.

gpiosynchronizer.js

A set of utility functions that let you use the Pixelblaze's GPIO capability to synchronize patterns between two Pixelblazes. It requires a only small amount of soldering, and minor changes to your pattern. No external hardware or software are needed.

CAUTION: Soldering and basic electronic skills required! To use this, you must connect two GPIO pins on each Pixelblaze -- one pin for reading, the other for writing. Be very sure that your Pixelblazes are connected to a common ground, or this will almost certainly not work.

I used GPIO4 and GPIO5 because they were easy to solder, and easy to use. The software lets you choose which pin is used for reading and which for writing, software you can wire your pins crossing 4-5, 5-4 if you want to use the same pattern on both Pixelblazes, or you can wire them straight across 4-4, 5-5, and cross in software by using initGPIO(4,5) on one Pixelblaze and initGPIO(5,4) on the other.

To use te software, wire up your Pixelblazes, copy the utility code into your pattern and:

  • Call initGPIO(inPin,outPin) to set up your GPIO pins
  • Call synchronize(delta) from your beforeRender() function
  • Call syncTime() instead of time() for things that need to be synchronized.
  • To manually initiate synchronization, call requestSync()

That's it -- your Pixelblazes will synchronize as soon as both are running a gpiosynchronizer-equipped pattern. If sync drifts over time, or because of user action, you can add calls to requestSync() as needed.

darkbolt.js

Fires an accelerating bolt of darkness down a colored strip. A nice effect on long linear strips. There are sliders to control background color, bolt size, speed and direction.

badfluorescent.js

A Totally Accurate Simulation of a failing fluorescent tube. Features dim, flickering ends, periodic arc failure, odd color changes... Will remind you why LEDs are better! This is part of my complete technological overkill bathroom mirror lighting system, which reproduces the colors of several different light sources. It um, sorta snuck in there, and insists on running every April 1.

cellularautomata1d.js

Renders elementary cellular automata as described by https://mathworld.wolfram.com/ElementaryCellularAutomaton.html Looks good on a linear LED strip, great on a strip rolled around a pipe or tube! Can give Star Trek style blinky computer lights that must be calculating Something Very Important, or more flowing visuals, depending on parameters.

midpointdisplacement1d.js

Very fast, organic looking "plasma" patterns!

Uses the recursive midpoint displacement algorithm to create a 1d heightmap of fractal-ish dimension, then animates by sweeping colors up and down the map. Allows control of many parameters, and can produce effects ranging from complete chaos to very smooth moving blends.

hypersnow.js

Inspired by a pattern in the ws2812fx arduino library. Flashes a random number of random pixels on a colored background at random intervals. Despite all the randomness, this is actually a cool and relaxing effect. Flash duration (spark hold) and maximum time between flashes (Max Delay) are controlled by sliders.

randomdissolve.js

Another pattern that is more relaxing than it sounds. Random colors dissolve and reform, randomly.

springytheater.js

Traditional "theater marquee" style chaser lights, with constantly changing intervals between the lights.

randomcolorwipe.js

Wipe transition between random colors.

july4bounce.js

An example of blending patterns by letting the eye do the mixing and averaging. Red, and blue bouncing pattern, with illusory white created by the eye averaging at high frame rate.

** CAUTION:** What's actually happening here is that it's rendering the red part and the blue part on alternate frames. There actually is no white in the pattern at all. Super cool if your strip is running around 120 fps or above. It's a chaotic, blinking mess otherwise.

Donation

If this project saves you time and effort, please consider donating to help support further development. Every donut or cup of coffee helps! :-)

paypal

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].