Guess what I built?

It not a Tufty, but you’re not far off. It is in a way a Tufty Clone. I built it before there was a Tufty. I have a Tufty here running a slightly modified version of that code.

I’ll try and get some good pics up latter on today.

It’s a Pimoroni Pico Lipo 16mb with a Lipo Battery attached. Pico Display Pack V2, RV3028 RTC, and BME280. No WIFI.
The color of the descriptor matches where the indicator is. And the color denotes conditions. Green is OK, yellow not to good, and Red is bad, etc. I went with white for the actual numerical displays as its easier to see and read. For me it is anyway as I’m partially color blind. Trying to read blue text gives me a headache.

The temperature scale goes from -32 to +32, 0c in the middle. On the one I take outside anyway. The Tufty version just sits on my desk and it goes from 0c to +32c. The readings will go past those numbers but the marker stops at the edge of the screen.

def describe_temperature(temperature):
    global t_color
    if temperature < -10:
        description = "Very Cold"
        t_color = white
    elif -10 <= temperature <= 0:
        description = "Cold"
        t_color = blue
    elif 0 < temperature <= 12:
        description = "Cool"
        t_color = yellow
    elif 12 < temperature <= 16:
        description = "Warm"
        tempcolor = green
    elif 16 < temperature <= 24:
        description = "OK"
        t_color = green      
    elif 24 < temperature <= 27:
        description = "Hot"
        t_color = orange
    elif temperature > 27:
        description = "Very Hot"
        t_color = red
    return description
def draw_graph(temp_value, press_value, humid_value):
    scaled_temp = int((temperature * 5) + 160)
    if scaled_temp <= 9:
        scaled_temp =9
        
    if scaled_temp >= 310:
        scaled_temp =310
    
    describe_temperature(temperature)
    display.set_pen(white)
    display.circle(9, 98, 9)
    display.rectangle(12, 89, 92, 19)
    display.set_pen(blue)
    display.rectangle(106, 89, 53, 19)
    display.set_pen(yellow)
    display.rectangle(161,89,78,19)
    display.set_pen(green)
    display.rectangle(241,89,38,19)
    display.set_pen(orange)
    display.rectangle(281,89,13,19)
    display.set_pen(red)
    display.rectangle(296,89,15,19)
    display.circle(310,98,9)
    display.set_pen(black)
    display.circle((scaled_temp),98,9)
    display.set_pen(white)
    display.circle((scaled_temp),98,5)    
    display.set_pen(t_color)
    display.text(describe_temperature(temperature),150,52,scale=4)    
1 Like