]> git.gir.st - Ledberg-ESP8266.git/blob - random.sh
implement storing color and use wifimanager to keep track of ssid/psk
[Ledberg-ESP8266.git] / random.sh
1 #!/bin/bash
2 # (c) 2019 Tobias Girstmair <https://gir.st/>; GPLv3
3
4 IP=10.42.0.74
5
6 C=(00 3F 7F FF)
7 old="000000"
8 while : ;do
9 R=${C[((RANDOM%3))]}
10 G=${C[((RANDOM%3))]}
11 B=${C[((RANDOM%3))]}
12 if test "$R$G$B" != "000000" && test "$R$G$B" != "$old"; then
13 old="$R$G$B"
14 printf "\\x02\\x$R\\x$G\\x$B" | nc -u $IP 1337
15 sleep 1
16 fi
17 done
Imprint / Impressum