Difference between revisions of "Village:Königlich Bayerisches Amtsvillage/Lightcontroller"

From SHA2017 Wiki
Jump to: navigation, search
(Created page with "Somewhere at the Königlich Bayrisches Amtsvillage, there will be a 5 meter RGB LED strip. You can control it via UDP. Just send packets with the red, green and blue values a...")
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
Somewhere at the Königlich Bayrisches Amtsvillage, there will be a 5 meter RGB LED strip.
 
Somewhere at the Königlich Bayrisches Amtsvillage, there will be a 5 meter RGB LED strip.
  
You can control it via UDP. Just send packets with the red, green and blue values as ASCII-Text separated by a space.
+
You can control it via UDP. Just send packets with the blue, red and green values as ASCII-Text separated by a space. The range is 0-1 inclusive. The values will be smoothly faded to make it more elegant.
 
The IP-Address will be published as soon as the device is online
 
The IP-Address will be published as soon as the device is online
  
 
<pre>
 
<pre>
 
#!/bin/bash
 
#!/bin/bash
# Set to yellow
+
# Set to some colour
echo "0.5 0.25 0" > /dev/udp/someaddress/8888
+
echo "1 0.5 0" > /dev/udp/151.216.39.81/8888
 
sleep 1
 
sleep 1
#set to purple
+
#set to cyan
echo "0.5 0 0.5" > /dev/udp/someaddress/8888
+
echo "1 0 1" > /dev/udp/151.216.39.81/8888
 
</pre>
 
</pre>

Latest revision as of 11:13, 5 August 2017

Somewhere at the Königlich Bayrisches Amtsvillage, there will be a 5 meter RGB LED strip.

You can control it via UDP. Just send packets with the blue, red and green values as ASCII-Text separated by a space. The range is 0-1 inclusive. The values will be smoothly faded to make it more elegant. The IP-Address will be published as soon as the device is online

#!/bin/bash
# Set to some colour
echo "1 0.5 0" > /dev/udp/151.216.39.81/8888
sleep 1
#set to cyan
echo "1 0 1" > /dev/udp/151.216.39.81/8888