Raspberry Pi Wireless NeoPixel server for RGB LEDs

Опубликовано: 18 Ноябрь 2024
на канале: Penguin Tutor
4,722
41

Run a wireless NeoPixel / Pixelstrip server on a Raspberry Pi. Using Python, Flask and WS281x library turns a Raspberry Pi Zero into a wireless controller for NeoPixels. This provides a graphical user interface which works over a web browser from a web browser, smart phone or that can be integrated into your home automation system.

Using Python flask as a web server a graphical interface (IoT GUI) is provided which allows you to select different sequences, speed and colors. Using these you can control your lights to provide safety lighting on late nights, mood lighting to help provide soothing lighting, or full on disco light sequencing.


This video explains about the decisions I made (C++ vs Python) and talks through the Python code and how it works. It explains how you can add your own sequences and gives a demo of the light sequences in action.


For details of the pixel-server project and download links see:
http://www.penguintutor.com/projects/...

More details about the electronics, including the MOSFET inverting voltage level shifter is available at:
http://www.penguintutor.com/projects/...


You can find out more about the Python Flask web framework at:
https://flask.palletsprojects.com/en/...

and about the RPI Python WS281x library at:
https://github.com/rpi-ws281x/rpi-ws2...

Finally you can learn more about crontab and it's roll in home automation at:
www.penguintutor.com/linux/crontab-at

Chapters:
00:00 Introduction to Raspberry Pi NeoPixels
01:26 Web application graphical user interface
02:15 Circuit Diagram
02:22 C++ vs Python
03:58 Python flask web framework
04:44 WS281x library
05:02 Python threads and shared memory through global variables
06:36 Pixel Server code
12:38 Pixelserver Configuration files
14:36 Adding your own sequences
21:56 Running the pixelserver server code
24:53 Using the web application graphical user interface
27:29 Raspberry Pi zero performance
34:34 Running pixelserver as a server daemon
38:15 Home automation with crontab
40:47 Future development