The Unwritten Words

Linux Newbie :: Archives


LCD display with RPi and room temperature

Some time ago, I’ve bought a Nokia 5110 LCD display. I didn’t have much time to play with it, until this week. Since yesterday, I’ve been exploring the PCD8544 library for the display, and thanks to Xavier Berger’s RPi Monitor app and his bits of code, I’ve created my own project.

This consists of two applications that display my Raspberry’s and room temperature:

The Hardware

For this project, I’ve used:

The setup

The PCD8544 and Digital Thermometer can be installed in the breadboard as shown in the drawing bellow:

rpimonitor breadboard

 

Note: If you want to reproduce this assembly, check carefully the pin order, it may be different, as the PCD8455 board pinning differs from model to model. The one is based on the LCD from eBay link above.

Note: For the 1- Wire Digital Thermometer Sensor setup, head HERE.

lcd2

The software

First of all, you have to install RPi-monitor to make the Python script work with your LCD screen. To do so, head to Xavier Berger’s git repository and follow instructions there. Next, install Python library for PCD8544 LCD from github and follow instructions from my previous post on the LCD.

Having installed the back-end, for the application, here comes the code for Raspberry Pi and room temperature!

Head to my github repository and

git clone https://github.com/bubbl/LCD-Monitor.git

onto your Raspberry Pi. Enter the LCD-Monitor directory:

cd /path/to/your/LCD-Monitor

and run either the RPi-Monitor based app:

sudo python rpimonitor.py

or the standalone app:

sudo python lcd-monitor.py

To run the app in background, add ‘&‘ (‘and’ symbol) after the terminal command. To stop it, type fg, hit [Enter] and [Ctrl] + C.

If you did everything well, you should see the screen display temperatures!

RPi-Monitor connected application:

lcd1

Standalone application:

Follow up:

LCD Display with Raspberry Pi (Part I)

LCD Monitor (Part III)

Tags: , , , , , , , , , , , ,


  • Brian Dunkery

    Very nice! I like it a lot! One more thing to make me buy a Raspberry myself ;)
    I was just wondering, the three cables – orange, yellow, and brown – where do they go and what are they for??? they’re not on the schematic picture…

    • http://www.bartbania.com/ Bart Bania

      oh, that’s just serial port connection, I’ve forgot to detach it for making the photo, not relevant for the project itself.
      get yourself a Pi, it’s combining business with pleasure :)

  • Mark

    Keep it up mate! I’m waiting for more advanced project based on this setup. Looks really interesting!

  • Donny

    I’ve got a question: why wouldn’t you set RPi-Monitor aside, and make it more simple, by obtaining the temperature data from the sensors themselves? I see the monitor, being a great tool, has some bugs, and it might make usage of your hardware unbearable. If I were you, I’d write the code from scratch, concentrating on the sensors themselves. You’ve got everything there, just use it in the right way.
    And heads up!

    • http://www.bartbania.com/ Bart Bania

      yes, I’ve just been thinking about it an hour ago, that’d be far more better to rely only on my skills and not copy anyone else. thanks mate! :)

      • Donny

        oh, I see you did your own application! that was fast! :) I cannot test it, as I don’t have the LCD, but I believe it works pretty well! looks good!

        • http://www.bartbania.com/ Bart Bania

          yes, it works nice, now I’ll be working on a bigger app! thanks!

  • kay

    is it REALLY your room temperature?! 25′C?
    whoa, it’s like 77 F! where do you live? Hawaii? ;)

    • http://www.bartbania.com/ Bart Bania

      I wish it was Hawaii! In fact, it’s rainy England. And it’s so hot in my flat because it’s an attic studio.

  • http://www.josejimenez.net Jose

    Hello, first of all, nice job :)

    I have a question: in the first image and in the breadboard scheme, you have resistances between gpio connector and lcd, but in the last one there are not. Are they necessary?

    Thanks!

    • http://www.bartbania.com/ Bart Bania

      Hi! thanks for the comment. as for the resistors, they’re not necessary, I even think obsolete when it comes to RPi. I was preparing this project to work with Arduino as well, there they’d be useful.
      but I got rid of them (won’t use this screen with Arduino) and left only the one on temperature sensor (this one IS necessary, however 4.7k is enough). as for the LCD, I only left the backlight resistor for safety reasons.

JOIN 7+ BILLION FABULOUS READERS: rss | email | twitter | +

Powered by Debian :: My Stack :: Webserver Statistics

Awesome VPS