Maniacal Labs User Forum

Full Version: Animated Porch Lights
You're currently viewing a stripped down version of our content. View the full version with proper formatting.




This project was originally installed last year just before Halloween, but with my old RPi-LPD8806 library which was, well, very slow. With 360 LEDs total, the old library could barely manage 10fps. Over a year later and a lot of work later, BiblioPixel is much more capable and I can push over 100fps.

The build consists of 10 meters of 36 pixel/m LPD8806 LEDs, wrapped in a waterproof sleeve. A Raspberry Pi controls the strip directly via the SPI output (it was built before the AllPixel). The Pi and a 20A power supply are mounted in a NEMA 4 enclosure for maximum weather protection.

The old version had a web interface for controlling it, but the BiblioPixel interface is completely different from RPi-LPD8806 so that had to be ditched for now... probably again in the future. For now, I put together a colorful display that was used for New Years Eve:

Code:
from bibliopixel.drivers.LPD8806 import *
from bibliopixel import *
from bibliopixel.animation import *
from strip_animations import *
import bibliopixel.colors as colors


FPS = 20
rainbow = [colors.Red, colors.Orange, colors.Yellow, colors.Green, colors.Blue, colors.Indigo, colors.Violet]

driver = DriverLPD8806(360, c_order=ChannelOrder.BRG, use_py_spi=True, dev="/dev/spidev0.0", SPISpeed=2)

led = LEDStrip(driver)

try:
    while True:
        led.all_off()

        anim = ColorFade(led, rainbow, step=10)
        anim.run(fps = FPS, max_steps=45*len(rainbow))

        anim = FireFlies(led, rainbow, width=10, count=4)
        anim.run(fps = 10, max_steps=100)

        anim = LarsonRainbow(led, tail=36)
        anim.run(amt = 3, fps = FPS, max_steps=(360*2)/3)

        anim = RainbowCycle(led)
        anim.run(amt = 2, fps = FPS, max_steps=256)

except KeyboardInterrupt:
    led.all_off()
    led.update()
Great Sharing. I liked it.
Nice one!
Incredible Sharing. I loved it.