-
1Step 1
Create Python script to control LED Strip.
- LEDControl.py
- Use https://github.com/jgarff/rpi_ws281x
- Add socket to listen for control commands.
- https://drive.google.com/open?id=1-A43Sh69AkA15NTMz8jnPYXUaJPq3Vr6GAduoZ0zuBg
-
2Step 2
Create REST API to easy external R/W access to multiple component (there will be some sensors apart from the LED eventually)
- PSLControl.rb
- Use Ruby + Sinatra
- GET <host:port>/leds: 200 - REST can connect to LEDControl. 404 - REST cannot connect to LEDControl
- PUT <host:port>/leds/color: Body: JSON, e.g.
{ "command": "1", "red": "255", "green": "0", "blue": "255", "brightness": "127", "delay": "50" }
-
3Step 3
Create Android app to control PSL.
-
4Step 4
Demo time
-
5Step 5
Automate RPi boot
- Add systemd script to start LEDControl.py (sudo) and PSLControl.rb
-
6Step 6
Repeat Step 1 for sensors information. Sensors.py will take car of gathering the information from temp, humidity and pressure sensors.
Add /sersors get entry in Sinatra PSLControl.ry to get Sensors information using REST API
-
7Step 7
Build basic index.html served by Sinatra to control the lamp from any web browser in the network.
Basic buttons to set modes: static white, static blue, random, chaser, and off modes
Button to get sensors information.
Perform POST/GET request to REST API using javascript.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.