Introduction

To simplify the viewing of changing data, we created this library of functions to simulate panel meters on your screen. It is based on pygame which is preinstalled on the Raspian OS so no additional software has to be installed.

What You'll Need

  1. A connection to your Raspberry Pi - either through a monitor and keyboard or remotely with VNC
  2. Optional - a TINKERplate connected to a programmed Raspberry Pi

Steps

Example 1 - Simple Meter

  1. Open the Thonny Python IDE under the Raspberry Icon:
  2. Enter the code as ahown below - you don't have to type all the stuff after the hashtags (#)
  3. If you have typed everything correctly, click on the green GO button should produce this window with changing data on your screen:
  4. Here's the code again if you prefer to simply paste it into your editor:
    The above code can be downloaded from github by typing the following instructions on the command line:

    1. git clone https://github.com/pi-plates/TINKERplate-Projects.git
    2. cd TINKERplate-Projects
    3. python3 SimpleMeter.py

Example 2 - Four Meters

  1. Either modify your existing code or enter this new example from scratch
  2. Write and save the code as shown below and don't worry about all the comments (the stuff after the hashtags)
  3. Again if you have typed everything correctly, click on the green GO button should produce this new window with changing data on your screen:

    Note that we have four lines of data now, bright yellow text, and a title for our window.
  4. Here's the code again with more comments if you simply want to paste it into your program:

The above code can be downloaded from github by typing the following instructions on the command line:

  1. git clone https://github.com/pi-plates/TINKERplate-Projects.git
  2. cd TINKERplate-Projects
  3. python3 FourMeters.py
Series Navigation<< Blink an LEDMeasuring Temperature Using a DS18B20 >>