Temperature and Humidity
Works with the DHT line of low-cost temperature & humidity sensors.
Temp(pin, type) - Reads sensor temperature data on connected pin
pin: pin number
type: DHT11 = 11, DHT12 = 12, DHT22 = 22, DHT21 = 21
Returns: Temperature in Celsius.Humidity(pin, type) - Reads sensor humidity data on connected pin
pin: pin number
type: DHT11 = 11, DHT12 = 12, DHT22 = 22, DHT21 = 21
Returns: Humidity level 0 to 100.
This example reads temperature and humidity, and converts Celsius to Fahrenheit and displays
@Loop
c = Temp(0,11)
h = Humidity(0,11)
#Convert Celsius to Fahrenheit
f = (c*1.8)+32
PrintLn("Current Temperature Celsius = ", c)
PrintLn("Current Temperature Fahrenheit = ", f)
PrintLn("Current Humidity is = ", h)
Wait(200)
Goto Loop