# Picozero as a library import module is included as a python file
# As Woki was having issues importing it by default
# AS part of the pico hardware steps this is imported without needing to include the file
#The hardware version of this script had to be modified for a DHT22 as Wokwi does not have a DHT11
#Code adapted from https://wokwi.com/projects/374636085248881665
print("Hello World")
import dht
import machine
import utime
print("Libraries Declared")
#Declare GPIO usage
DHTTYPE = dht.DHT22
pin = machine.Pin(16)
data_dht = dht.DHT22(pin)
print("GPIO Pins Declared")
while True:
data_dht.measure()
print()
print ( f" temperature (C) :{data_dht.temperature()}")
print ( f" humidity (%): {data_dht.humidity()} ")
utime.sleep(4)