Light Play is a little project which was created to play some simple light animations with a Raspberry Pi 4 and some LEDs.
First make sure that you've connected six LEDs to the GPIO Pins of your Raspberry Pi. If you don't know how to connect a LED to a Raspberry Pi click here. If you know how to do it you can use the picture underneath to connect the LEDs correct. You have to connect the LEDs in the following order:
- GPIO23 Green
- GPIO24 Yellow
- GPIO25 Orange
- GPIO16 Red
- GPIO20 Purple
- GPIO21 Blue
The Picture was created with Fritzing.
After you've connected the LEDs, you should make sure that your Raspberry Pi is up to date. To do so tap the following command into your terminal and press enter after you're done.
sudo apt update
Now go ahead with the next one and press enter.
sudo apt full-upgrade
Your little Pi should be up to date now. To use Light Play you also have to install the RPi.GPIO module. It's used to control the GPIO pins of your Raspberry Pi easily. For more information about this package please click here.
To install RPi.GPIO tap the following command into the terminal and press enter.
pip install RPi.GPIO
You're ready to install Light Play now!
To install Light Play just tap the following command into your terminal and press enter.
git clone https://github.com/GreyZenTiger/light-play.git
Open Light Play by tapping the next line into your terminal.
cd light-play
To run Light Play you just need to tap that last command into your terminal.
python3 light_play.py 1
You could switch the light effect by changing the number at the end of the command. Use 1 for the Knight Rider Light, 2 for Flickering Light or 3 for Clapping Light.
This software is published under the GPLv3 license.