Joy-it RB-P-XPLR-SET handleiding

37 pagina's
PDF beschikbaar

Handleiding

Je bekijkt pagina 11 van 37
. DHT 
The DHT11 sensor can detect temperatures from 0 °C to 50 °C (±2 °C accuracy) and relative humidity from 20 % to 80 % (±5 %) (at most once per second).
Weather stations are probably the primary area of application for a sensor such as the DHT11. To test the functionality, it is suicient to hold your mouth
close to the sensor and exhale slowly. The breathing air diers from the environment in terms of temperature and humidity, which should lead to a significant
change in the values.
The DHT11 is connected to the GPIO pin GP0.
from machine import Pin
from dht import DHT11
from utime import sleep
# Initialize DHT11 Sensor
dhtPin = 0
dht = DHT11(Pin(dhtPin, Pin.IN))
while True:
# Measure DHT11 values
dht.measure()
temp = dht.temperature() # Temperature in Celsius
humid = dht.humidity() # Relative Humidity in %
# Print the measurements
print('Temperature:', temp, '°C')
print('Humidity:', humid, '%')
sleep(2) # Wait for 2 seconds before the next reading
11

Bekijk gratis de handleiding van Joy-it RB-P-XPLR-SET, stel vragen en lees de antwoorden op veelvoorkomende problemen, of gebruik onze assistent om sneller informatie in de handleiding te vinden of uitleg te krijgen over specifieke functies.

Productinformatie

MerkJoy-it
ModelRB-P-XPLR-SET
CategorieNiet gecategoriseerd
TaalNederlands
Grootte21690 MB