Receives commands from the sc-master using the SCP protocol, process them and convert it to signals for any W2812B LED strip, using the rpi_ws281x library. Runs on the Raspberry Pi 3 with Python 3.7 or 3.8 .
- Create a virtual environment (venv) if it's not created yet.
- Activate the venv:
source <path of the venv>/bin/activate
. - Go to
src
folder:cd src
- Give execution permissions to the main script:
chmod +x main.py
- Start the main script: './main.py'
python3 -m venv <path of the venv>
or
virtualenv -m <path to the python interpreter> <path of the venv>
By default, the server logs on the sc-rpi.log
file (on the root folder) and also in console. To disable console logging, remove the console
property on the configuration file config.ini
.
- Create a virtual environment (venv) if it's not created yet.
- Activate the venv:
source <path of the venv>/bin/activate
. - Go to
src
folder:cd src
- Invoke unittest:
python -m unittest discover
- With level shifter conversor:
More information: https://tutorials-raspberrypi.com/connect-control-raspberry-pi-ws2812-rgb-led-strips/
- Without level shifter conversor: More information: https://core-electronics.com.au/tutorials/ws2812-addressable-leds-raspberry-pi-quickstart-guide.html
- Timout functionality in case of no receiving commands.
- Automatic stress testing to send multiple commands in a short period of time.
- Document errors
- Differentiate errors (return bad request, conflict, etc)