SaPin is an interactive and festive project based on two Raspberry Pi devices, designed to capture the spirit of Christmas through lights, music, and animations. It combines technology and creativity to create a magical and immersive experience.
-
🎅 Two operating modes:
- Mode 1: Lights always on, music (Jingle Bells) played through a buzzer, and a sparkling animation on an 8x8 LED matrix.
- Mode 2: Lights and the servo motor activate only in the dark, thanks to a light sensor.
-
✨ Animated decoration: A servo motor moves a festive decoration.
-
💡 WS2811 addressable LED string: LED lights controlled independently through a TCP connection.
-
🔌 TCP connection: Communication between two Raspberry Pi devices for distributed management of features.
- 2 Raspberry Pi devices (one server, one client)
- Digital Push Button Keystudio
- Keystudio Photocell Sensor with ADS1115 module
- Keystudio Passive Buzzer
- WS2811 Digital LED String (50 LEDs)
- Micro Servo 9G
- Keystudio 8x8 LED Matrix (KS0522)
- External power supply for the LED string
Instructions will be available soon. Client : Library adafruit-circuitpython-ht16k33 Server : Library rpi_ws281x
GPIO Pin | Component | Description |
---|---|---|
GPIO 17 | Servo motor | Movement control |
GPIO 18 | Passive buzzer | Music playback |
GPIO 27 | Push button | Mode switching |
SDA/SCL | 8x8 LED matrix and ADS1115 | I²C communication |
ADS1115 | Photocell sensor | Light intensity measurement |
GPIO Pin | Component | Description |
---|---|---|
GPIO 12 | WS2811 LED string | Light control |
On the Raspberry Pi controlling the LED string, run the server script:
$ python3 tcp_serveur.py
On the second Raspberry Pi, run the client script:
$ python3 main.py
- Mode 2 (default): Automatically activates in the dark. The lights and servo motor will only work when the photocell sensor detects low light.
- Mode 1: Press the button to activate all features, including:
- Constantly lit lights
- Music playback (Jingle Bells)
- Sparkling animation on the 8x8 LED matrix
To stop the program:
- Stop the client script:
Ctrl+C
- Then stop the server script:
Ctrl+C
- ht16k33 Library (8x8 LED matric): Official documentation will be added soon.
- WS281 Library (LED string): Will be added soon.
- Musical note frquencies: Will be added soon.
- Python Threads Tutorial: Will be added soon.
Watch the video demonstration of SaPin on YouTube:
This project is developed as part of the course PROGRAMMATION DE PLATEFORMES EMBARQUÉES | 420-314-MV.
Copyright © [2024] @Loulouplou and @KarolannMauger.
All rights reserved. Redistribution, modification, and commercial use are strictly prohibited.
🎅 Happy holidays from the saPin team!