Overview
Read moreThis project helps anyone to control LEDs on a NeoPixel LED Strip, thanks to 2 simple HTTP GET / API:
http://ip:8083/switchAllOff?
will switch off all the LEDs
http://ip:8083/changeLed?ledId=[0-7]&red=[0-255]&green=[0-255]&blue=[0-255]&brightness=[0-100]
will change the ledID selected with the color (red, green or blue) and the brightness passed.
http://ip:8083/changeLedInRange?from=[0-7]&to=[0-7]&red=[0-255]&green=[0-255]&blue=[0-255]&brightness=[0-100]
will change the ledId in the range [from,to] with the color provided.
This allows easy integrations with other applications running on the RPi with a simple HTTP/Get command. The project works on Raspberry Pi boards.
How to use it:git clone the repository
run as root: sudo node neopixel_server.js
The server listen on all interface by default: If the LEDs are controlled from applications inside the device, change the code in order to run the server only on localhost. Search and replace the code:
--> app.listen(8083);
with
--> app.listen(8083,'localhost');
VideoThere is a video here showing the project:
Andrea De Gaetano
10 projects • 25 followers
Interested in iot, mobile and security
Love hackathons
This is my blog http://pestohacks.blogspot.com
Comments