Paul Sutton

ChristmasTree

Raspberry Pi Xmas tree

I was sent a Raspberry Pi xmas tree module last year and have just got round to setting it up. Results with some example code (below) seem pretty good. Most of the LEDs work.

from gpiozero import LEDBoard
from gpiozero.tools import random_values
from signal import pause
tree = LEDBoard(*range(2,28),pwm=True)
for led in tree:
 led.source_delay = 0.1
 led.source = random_values()
pause()

Tags

#RasberryPi,#Python,#Code,#ChristmasTree,


MastodonPeertubeJoin Mastodon

AI statement : Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity. Consent CANNOT be assumed, it has to be granted.

Donate using Liberapay