-
Notifications
You must be signed in to change notification settings - Fork 1
Home
This repository contains part of the code for ACM at CSUF's Blinking Lights event! The intention of the event is to encourage creativity without necessarily being good at programming. The event is meant to be a few hours long, so it's more like a short Hackathon.
In this event, people will be writing small Python/JavaScript programs that control the LED lights on a Christmas tree. The positions of these LEDs are scanned before the event begins by recording a video of the tree and processing it (see Scanning the Tree).
This idea was inspired by Stand-Up Maths' video of having a Christmas tree with 500 reprogrammable LEDs and using them for visualizations. This project is quite a step down from that: instead of using a 3D plane, it limits itself to the 2D plane so that people have an easier time programming for it.
If this is your first time seeing this and want to start testing things out, head to Coding the Tree pt. 1 (simple).
-
christmas
contains code to scan the tree and process LEDs and images. It also contains wiki pages for the whole project. You are here. -
christmasd
contains server implementations to allow people to connect to the tree.-
christmasd
itself refers to the server that runs on the Raspberry Pi (see Hardware). -
christmasd-test
is specifically for testing. It gives each user a webpage that simulates the tree LEDs in real-time using the same exact protocol for testing.
-
-
christmas-client-js
contains a JavaScript library to interact withchristmasd
. -
christmas-client-py
contains a Python library to interact withchristmasd
. -
christmas-js-example
contains an example of usingchristmas-client-js
. -
christmas-py-example
contains an example of usingchristmas-client-py
.
Note
Image not displaying properly? Check blink.acmcsuf.com#architecture.
The following hardware is needed for this event:
-
Christmas Tree
- Price: $49.99
- Size: 6ft (~1.8m)
- Raspberry Pi
- Any Pi will do, but for this event, we're using a Raspberry Pi Zero.
- 4 of LED Strips (12V)
- Actual LED bulbs rather than strips, so better for 2D use.
- 0.3W per bulb, 50 bulbs per strip, 15W per strip
- For 5V, 3A per strip
- For 12V, 1.25A per strip
- Price:
- $18.50 (50x, 13ft, 4m)
- $37.00 (100x, 26ft, 8m)
- $55.50 (150x, 39ft, 12m)
-
LED Power Supply (12V)
- Price: $11.99
- 12V 5A, so can power 4 strips or 200 bulbs
The 4 LEDs' data line can safely be chained together and plugged into the Raspberry Pi with any GPIO pin that works.
All code in this repository (and others) are developed within a Nix shell. It is strongly recommended that you also use the supplied Nix shell for at least christmas
and christmasd
due to the number of dependencies that it requires.