Skip to content

Scripts used to generate LED intensity data sequences to mimic fireplace video.

Notifications You must be signed in to change notification settings

billtubbs/led-fire-place

Repository files navigation

led-fire-place

Python scripts used to generate LED intensity data sequences to mimic fireplace video.

Click image below to see YouTube video of the LED fireplace:

IMAGE ALT TEXT

See also this instructables articles I wrote:

Steps

1. Build LED display

I used just under 90 RGB WS2812 LEDS connected to a Teensy microcontroller running the FastLED library.

To create a flame-like effect, I used strips of white paper glued to a carboard frame with the LEDs pushed through holes in a random pattern and black paper for the simulated logs.

2. Switch each LED on separately in a sequence and film it with a smartphone video camera

Here is the Arduino script for the Teensy:

3. Load video file and select a frame to represent the effect of each LED

See this Jupyter notebook:

Frame from phone camera video:

4. Download a video from YouTube of a real fire in a fireplace and extract image frames

See this Jupyter notebook:

I used this video on YouTube: YouTube video:

5. Compute LED intensities to mimic the real fire video

This involves mimicking the LED display using the image masks for each LED and finding a set of LED intensities (RGB) that best reproduce the image.

See this Jupyter notebook:

6. Adjust LED intensities and upload to microcontroller

See this Jupyter notebook:

Here is the final Arduino script to run the LED sequence on the Teensy:

About

Scripts used to generate LED intensity data sequences to mimic fireplace video.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages