Eleftheria Karagiorgou
Published © CC BY

Let's Celebrate Christmas with Raspberry Pi

Students learn coding with Python combining Raspberry Pi 3 and The Pi Hut 3D Xmas Tree: An educational activity in the Christmas spirit!

BeginnerProtip696
Let's Celebrate Christmas with Raspberry Pi

Things used in this project

Story

Read more

Schematics

img_1207_KqS3weQIa3.JPG

Code

All Leds on!

Python
The tree Leds are on randomly
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()

Credits

Eleftheria Karagiorgou
6 projects • 8 followers
Computer Science and Robotics teacher in K-12 Education, Code Girls Educator, Maker, eSafety Ambassador https://padlet.com/kareri
Contact

Comments

Please log in or sign up to comment.