# Written on 19/07/2024 by Jordan James
from machine import Pin
from time import sleep
import dht
print("Working!")
LEDPIN = 32
pin = Pin(LEDPIN, Pin.OUT)
sensor = dht.DHT22(Pin(4))
while True:
sensor.measure()
temp = sensor.temperature()
humid = sensor.humidity()
sleep(1)
print(temp)
print(humid)
if temp < 0:
pin.value(1)
else:
pin.value(0)