The hardware side of this project is quite simple really, There is a ssd1306 OLED screen to display your status a WS2812 8 LED ring and a few buttons.

Software

Before we get started we need to install a few things. I followed the install instructions on the links below

I've had to split the code into 2 camps. If you are using a raspberry pi zero you will know that you have to run raspbian jessie but if your using a raspberry pi original or 2then there's a good chance your still using raspbian wheezy. To check what version your running run this command

cat /etc/debian_version

If it returns 7.x then your on wheezy, If it returns 8.x then your on jessie

Rasbian jessie code

If you are running jessie on your raspberry pi then you will need to follow these steps

Since the release of jessie raspbian has moved over to systemd which changes the way you start code at startup.

Shutdown button code needs to run all the time because it needs to always check to see if the shutdown buttons been pressed. This script will be set up separate from the status screens script. The shutdown button code can be found on my github page.

  1. Place pishutdown.py in '/home/pi/shutdown'
  2. Make script executable with 'sudo chmod +x pishutdown.py'
  3. Move pishutdown.service to /etc/systemd/system/
  4. Enable service 'sudo systemctl enable pishutdown.service'
  5. Run service at boot 'sudo systemctl start pishutdown.service'

Weather display code updates every 15 minutes and 1 minute after boot. The code can be found on my github page. You need to register as a developer on weatherunderground.com and add your api key to the code.

  1. Move 'jessie_weather_screen.py' to /home/pi/
  2. Make script executable with 'sudo chmod +x jessie_weather_screen.py'
  3. Move both weather_screen.service and weather_screen.timer to /etc/systemd/system/
  4. Enable it with 'sudo systemctl enable weather_screen.timer'
  5. Start at boot with 'sudo systemctl start weather_screen.timer'
  6. Reboot when done

Temperature logging code also runs every 15 minutes and 1 minute after boot. The code can be found on my github page. You will need to sign up to be a developer on thingspeak.com and add your api key to the code for it to work.

  1. Move templogger.py to /home/pi
  2. Make script executable with 'sudo chmod +x templogger.py'
  3. Move templogger.service templogger.timer to /etc/systemd/system/
  4. Enable service 'sudo systemctl enable templogger.timer'
  5. Run service at boot 'sudo systemctl start templogger.timer'

Rasbian wheezy code

If you are running wheezy on your raspberry pi then you will need to follow these steps

Shutdown button code needs to run all the time because it needs to always check to see if the shutdown buttons been pressed. This script will be set up separate from the status screens script. The shutdown button code can be found on my github page.

  1. Place pishutdown.py in '/home/pi/shutdown/'
  2. Make script executable with 'sudo chmod +x pishutdown.py'
  3. Edit '/etc/rc.local' as root aka 'sudo vi /etc/rc.local'
  4. Add 'sudo python /home/pi/shutdown/pishutdown.py' before the 'exit 0' line
  5. Save file and reboot pi

Weather display code runs every 15 minutes.The code can be found on my github page. You need to register as a developer on weatherunderground.com and add your api key to the code.

  1. Move 'wheezy_weather_screen.py' to /home/pi/
  2. Make script executable with 'sudo chmod +x wheezy_weather_screen.py'
  3. Edit crontab with 'EDITOR="vi" crontab -e'
  4. Add this line to end of file '0,15,30,45 * * * * sudo python /home/pi/wheezy_weather_screen_bmp.py'
  5. Reboot for good measure

Temperature logging code also runs every 15 minutes and 1 minute after boot. The code can be found on my github page. You will need to sign up to be a developer on thingspeak.com and add your api key to the code for it to work.

  1. Move templogger.py to /home/pi/
  2. Make script executable with 'sudo chmod +x templogger.py '
  3. Edit crontab with 'EDITOR="vi" crontab -e'
  4. Add this line to end of file '0,15,30,45 * * * * sudo python /home/pi/templogger.py'
  5. Reboot for good measure

Hardware

As I said above this is my first project to use the raspberry pi GPIO with python. I know that this project might be considered over kill by some and I could have just used a ESP8266. This wasn't the point of the project, I just simply wanted to try developing on the raspberry pi. One of my bug bears with the raspberry pi is that Dropbox don't make a client for the platform. I have found an alternatives which is open source and free, syncthing is slightly different then Dropbox because you host your own files. Lucky the software takes care of everything for you and the storage is practically unlimited.

I have incorporated my previous project the shutdown button into the project and added a reset button. The reset button shorts the run pin on your pi. The problem with the run pins is they are in different spots on the different pi's, so I'm going to have a female header and connect the pins with jumper wires.

Videos

Hardware walk thought

Time lapse build video