Traveling in Blanquillo AND MORE
  • Home
  • Trips
    • 2022 >
      • 2022 Tennessee
      • 2022 Blue Ridge Parkway
    • 2021
    • 2020 >
      • 2020 Sierras
    • 2019 >
      • 2019 Crater Lake
      • 2019 Westside Regional Park
    • 2018 >
      • 2018 So.California
      • 2018 Colorado-Arizona
      • 2018 Banff-Jasper
      • 2018 Osoyoos, BC
    • 2017 >
      • 2017 Olympic
      • 2017 Channel Islands
      • 2017 Eclipse
    • 2016 >
      • 2016 Glacier-Yellowstone
      • 2016 Southwest
    • 2015 >
      • 2015 Bryce-Zion
      • 2015 Lava Beds
      • 2015 Bristlecone-Yosemite
      • 2015 July first trip
    • 2014 >
      • 2014 Utah
    • 2011 >
      • Gold Beach
  • Camping Map
  • Our Escape
  • Radio and Hobbies
    • Amateur Radio Commentary >
      • AREDN
      • Antenna on mast
      • Winlink
    • Christmas LED Display
    • Scripts for Growing Classes >
      • 12- WeatherFIles
      • 11- sketch_MorseCodeDecoder.ino
      • 2e-RGB-LED
      • 2f-RGB-LED-GUI
      • 2g-RGB-LED-GUI
      • 3a-thermometer.py
      • 3b-thermometer-plus
      • 4a_DHT_simpletest.py
      • 4b_DHT_send_temperature.py
      • 4c_DHT_send_temperature_LED.py
      • 4c_DHT_send_temp.service
      • 4d_DHT_send_temp_LED_OLED.py
    • Winlink for Field Day 2020
    • VE Credentials
    • Antenna Analyzer Code
  • Collegedale Tax Prep
  • Links
  • Contact
  • Home
  • Trips
    • 2022 >
      • 2022 Tennessee
      • 2022 Blue Ridge Parkway
    • 2021
    • 2020 >
      • 2020 Sierras
    • 2019 >
      • 2019 Crater Lake
      • 2019 Westside Regional Park
    • 2018 >
      • 2018 So.California
      • 2018 Colorado-Arizona
      • 2018 Banff-Jasper
      • 2018 Osoyoos, BC
    • 2017 >
      • 2017 Olympic
      • 2017 Channel Islands
      • 2017 Eclipse
    • 2016 >
      • 2016 Glacier-Yellowstone
      • 2016 Southwest
    • 2015 >
      • 2015 Bryce-Zion
      • 2015 Lava Beds
      • 2015 Bristlecone-Yosemite
      • 2015 July first trip
    • 2014 >
      • 2014 Utah
    • 2011 >
      • Gold Beach
  • Camping Map
  • Our Escape
  • Radio and Hobbies
    • Amateur Radio Commentary >
      • AREDN
      • Antenna on mast
      • Winlink
    • Christmas LED Display
    • Scripts for Growing Classes >
      • 12- WeatherFIles
      • 11- sketch_MorseCodeDecoder.ino
      • 2e-RGB-LED
      • 2f-RGB-LED-GUI
      • 2g-RGB-LED-GUI
      • 3a-thermometer.py
      • 3b-thermometer-plus
      • 4a_DHT_simpletest.py
      • 4b_DHT_send_temperature.py
      • 4c_DHT_send_temperature_LED.py
      • 4c_DHT_send_temp.service
      • 4d_DHT_send_temp_LED_OLED.py
    • Winlink for Field Day 2020
    • VE Credentials
    • Antenna Analyzer Code
  • Collegedale Tax Prep
  • Links
  • Contact
​​# 3a-thermometer.py
# From the code for the Box 1 kit for the Raspberry Pi by MonkMakes.com

from PiAnalog import *
from guizero import App, Text
import time

p = PiAnalog(1)

# Update the temperature reading
def update_temp():
    temperature = p.read_temp_f(3950,10000)
    temperature = "%.2f" % temperature # Round the temperature to 2 d.p. 
    temp_text.value = temperature
    temp_text.after(1000, update_temp)

# Create the GUI
app = App(title = "Thermometer", width="370", height="300")
app.tk.geometry("370x300+500+500")    #size and position the GUI
Text(app, text="Temp F", size=32)
temp_text = Text(app, text="0.00", size=110)
temp_text.after(1000, update_temp) # Used to update the temperature reading
app.display()
Copyright © 2023 by Dornbush Web Design