"""
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Raspberry Pi Pico 7-Segment Display Counter (MicroPython)┃
┃                                                          ┃
┃ A program to demonstrate the use of a 7-segment display  ┃
┃ by implementing an ascending/descending hexadecimal      ┃
┃ counter based on the state of an input switch.           ┃
┃                                                          ┃
┃ Copyright (c) 2023 Anderson Costa                        ┃
┃ GitHub: github.com/arcostasi                             ┃
┃ License: MIT                                             ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
"""
from machine import Pin
from utime import sleep
from dht import DHT22
dht=DHT22(pin(15))
while True:
    dht.measure()
    temp=dht.temperature()
    hum=dht.humidity()
    print(f"Temperature: {temp}°Humidity: {hum}% ")
    sleep(5)