Skip to content

Instantly share code, notes, and snippets.

@hannes-angst
hannes-angst / ledColorTest.sh
Last active February 2, 2020 11:13
Random bytes as hex
#!/bin/bash
while :
do
COLOR=`head -c3 </dev/urandom|xxd -p -u`
NOW=`date +%Y-%m-%dT%H:%M:%S%z`
echo -n "${NOW} - ${COLOR}"
mqtt_pub -t "/angst/devices/0017EF8C/led" -m '["'${COLOR}'"]'
echo
sleep 1

Keybase proof

I hereby claim:

  • I am hannes-angst on github.
  • I am hangst (https://keybase.io/hangst) on keybase.
  • I have a public key ASCy1_YbhLmiFHi7TRPesxxICrSGpaoXddySZNgNUT_xjAo

To claim this, I am signing this object: