Gauge On-screen display software

I’m looking for a solution to display pi outputs on the screen. Anyone know of downloadable software, free or not is OK.
Putting it simply; I have senders that produce a digital output. I’d like to be able to program so that a display shows a representation of the sender’s status. Like a bar chart. 3/3 off no bar, 3/3 on displays full bar. 1 or 2 of 3 on, some point in between.


Hey Colin :slight_smile:

I’d suggest checking out TKinter. - see chapter 4 of our online Pi workshop:

1 Like

Hi Oliver,

Thanks those are interesting and Ive watched through several,its along the right lines, but they seem to go in the wrong direction.

I need the GUI to respond to the sensor.

So instead of a click turning on the led and changing the screen, when the led is turned on by the capacitive switch, I need part of the gui to change.


1 Like

You could have a look at NodeRED.

1 Like

Hey everyone,

Just to confirm Colin, did you mean you were looking to Dynamically update the data in TKinter to represent the sensor value?

If so TKinter’s great for that too! You just need to implement the after method in TKinter.

I’ve thrown together a bit of code down below, it just updates the variable data as a random number every 100ms, but there’s no reason why you can’t replace this with a sensor read!

import tkinter as tk 
import random

frame = tk.Tk() 

def getData():
    data = str(random.randint(0,100))
    lblDataRead.config(text = data)
    frame.after(100, getData)

frame.title("Gui Test") 
lblDataText = tk.Label(frame, text = "Data") 

lblDataRead = tk.Label(frame, text = "") 



Hope this helps!

1 Like

Thanks, having a look at that. The simple gauge would work quite well, pretty much what I visualised.

1 Like

Thanks Owen, yes it does need to be dynamic, so appreciate the input. Ive been working through the core-elec demo/tutes, but haven’t been yet able to find anything where the sensor drives the program.
the sensors are in effect digital, so really just ends up as three possible value points. 0,0 = low (green)
1,0 = mid (amber) 1,1 = high (red).

And as the tank is pumped out, it would return high to mid to low.

Ill have a play with your code sample over the weekend.


Hey Colin,

TKinter caters for colours too, you just set the background (bg) and foreground (fg) variables of the labels. For example:

def getData():
    data = sensorRead()
    if(data == 0):
        lblDataRead.config(bg = "red")
    frame.after(100, getData)

Should display read when the digital sensor value is low.

Just a note, the above is half pseudocode, checkout this video tutorial for a better explanation!

Core might be able to get another TKinter video or tutorial up to step through dynamic variable changes to help out in situations like this :grin:

1 Like

Hi Peter - this is kinda embarassing, but dashboard…Ive installed the latest node red - but cannot get any of the scripts of nodered org to run and install dashboard.

Clearly I’m missing something really basic or is there a trick?

Sorry really new to this, thanks in advance…

1 Like

I’m running an older version of NodeRED and node-red-dashboard, which I installed using “Manage palette” accessed in the top-right of the NodeRED GUI.

1 Like

Thanks Got it! Much appreciated!

1 Like