tom-2015 / rpi-ws2812-server

Raspberry Pi WS2812 (web) server tool
172 stars 39 forks source link

bash scripting question #50

Closed oscarmh closed 4 years ago

oscarmh commented 4 years ago

Hi, thanks for that server it is really amazing. Quick question, any suggestion to interact using bash scripting ? Thanks in advance

tom-2015 commented 4 years ago

Start the server with the -p parameter or change the /etc/ws2812svr.conf file if you are using it as a daemon. This will create a named pipe you can write commands to.

sudo ./ws2812svr -p /dev/ws281x

in your script you can echo to the pipe:

echo "YOUR COMMAND;" > /dev/ws281x

oscarmh commented 4 years ago

Great !! Thanks a lot !!