From Bjoern Hassler's website
< RPi
Jump to: navigation, search

BlinkStick to show the temperature[edit]

It's quite clear to me that if you're running the RPi headerless, that you need some sort of feedback from it: Has it booted? Is it still running? Does it have network? It'll be easy to do with an LED (which admittedly is also one of the first recommended projects you might do). I haven't bought an LED set yet, but a friend happened to give me a BlinkStick he had lying about. So I am going to use the BlinkStick to get system information.

sudo apt-get install python2.7-dev
sudo apt-get install python-pip
sudo pip install blinkstick

While I got the blinkstick to work, and it makes pretty colours, it seems to interfere with the Edimax wifi dongle and networking in general. Tell me about Schrödinger's cat. Oh well. I'll get some LEDs. Bjoern 16:02, 7 December 2013 (UTC) Or maybe it wasn't that - the edimax still shuts down ever so often. Why? Bjoern 19:15, 7 December 2013 (UTC)

You have to be ever so careful with the power supply. There aren't any problems when wired ethernet is connected, but with the wifi dongle and the blinkstick, the draw was too much for the power supply! So have now put better power supply onto the pi, and it works. (Incidentally, powering the Pi from the USB port on my router seems to work as well, at least to run the Pi alone, on wired ethernet. Connecting other usb devices to it doesn't work, so it's probably only marginally enough.)

The way I have the blinkstick set up is to give these six colours:

       (0     0     0   off)
0      0     0   255 blue
1      0   255 255 cyan 
2      0   255   0   green 
3    255 255   0   yellow
4    255   0     0   red
5    255   0   255 magenta 
6    255 255 255 white

It's of course completely possible to set these up differently, but the colours like this work well (magenta is quite bright). You could extend the range downwards by fading the blue to off, but the blue is fairly faint already. When using this for temperature, you can fairly easily distinguish a range about 6 degrees, which should be plenty for most temperature preferences (for indoors, i.e. a range of a few degrees above or below 20 degrees C)!

Because it's good to know that the RPi is running, the LED turns off once every minute. If there's network, it just immediately turns back on. However, if there is no network, it blinks a few times. So you know the RPi is active, but network is lost. That's not bad!