A Python weather indicator for Blink1 indtened to be run on a Raspberry Pi
Download Raspbian here and install on a 4Gb SD card as per the instuctions.
Edit /etc/network/interfaces on the SD card. Something like this:
# The loopback interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
# your static IP
address 192.168.0.100
# your gateway IP
gateway 192.168.0.1
netmask 255.255.255.0
# your network address
network 192.168.0.0
broadcast 192.168.0.255
Boot up your Raspberry Pi with network and blink1 attached.
From terminal ssh into your Pi (password will be "raspberry")
$ ssh pi@192.168.0.100
Optionally run raspi-config to fill partitions, set timezones, change password etc.
$ sudo raspi-config
Create code directory
$ mkdir ~/code
$ sudo apt-get install libusb-1.0-0-dev
$ cd ~/code
$ git clone git://github.com/todbot/blink1.git
$ cd blink1/commandline
$ make
$ sudo ./blink1-tool --on
$ cd ~/code
$ git clone https://github.com/gregology/WeatherBlink.git
$ sudo nano /etc/init.d/WeatherBlink
And add something like this
#! /bin/sh
# /etc/init.d/WeatherBlink
# The following part always gets executed.
echo "This part always gets executed"
# The following part carries out specific functions depending on arguments.
case "$1" in
start)
cd /home/pi/code/WeatherBlink/
python BlinkWeather.py
;;
stop)
echo "Nothing really happens here"
;;
*)
echo "Usage: /etc/init.d/foobar {start|stop}"
exit 1
;;
esac
exit 0
Then set permissions
$ sudo chmod 755 /etc/init.d/WeatherBlink
$ crontab -e
Add this line
*/10 * * * * cd /home/pi/code/WeatherBlink; python FetchWeather.py
$ cd ~/code/WeatherBlink; python FetchWeather.py
$ sudo reboot