Close
0%
0%

rpi_status

OLED screen to display info (i.e. weather) teamed up with a ws2812 led ring for glanceable status. Also a shutdown and reset button

Similar projects worth following
I've always been into glanceable info, I love being able to glace at something and it tells me everything I need to know. The raspberry pi zero is the perfect board for this project. I had a sdd1306 oled lying around. I added a ws2812 8 led ring for a indicator. Also I thought while I'm at it I might as well add a BMP180 temp sensor into the mix.

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...

Read more »

  • 1 × ssd1306 oled
  • 1 × WS2812 ring 8 LED's
  • 4 × Button
  • 1 × LED
  • 1 × Resistor 220ohm

View all 7 components

  • PCB's have arrived

    facelessloser03/05/2016 at 11:46 0 comments

    My PCB's have arrived from my favourite board house oshpark. Just need to get them assembled then i can write more python code for it

  • Finished layout and ordered PCB

    facelessloser02/17/2016 at 21:41 0 comments

    Finally finished the layout and send off the gerber files to oshpark. It normaly takes about 16 days but Im still waiting on the 90 2x20 pin headers. I hope I have added enough buttons ;)

  • A name and a change to hardware

    facelessloser02/10/2016 at 20:40 0 comments

    I couldn't come up with a name for this project when I started it but now I'm naming it "Rpi_status".

    I wanted to add more ws2812 and was looking at the 8 LED strips, But I didn't really have the space for it. I found that you can get a ws2812 8 LED in a ring which would fit nicely next to the ssd1306 oled screen

View all 3 project logs

Enjoy this project?

Share

Discussions

facelessloser wrote 10/15/2016 at 10:04 point

what library are you using for the ws2812? I'm using the pimoroni unicorn hat library found here https://github.com/pimoroni/unicorn-hat If you look in my code there is a section called "LED_BRIGHTNESS = 127" where you can adjust the brightness from 0 -255

  Are you sure? yes | no

arnaud.goulut wrote 10/14/2016 at 08:07 point

As i used to spend a lot of time under the quite-comfy-cosy-hot-out-of-the-real-world shower, I've made a countdown that lasts for 3 minutes. 

I made it "graphical" with a ring of 24 WS2812 LEDs but I find it way too bright. Do you have the same feeling ? 

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates