mirror of
https://github.com/kevinveenbirkenbach/erinaco.git
synced 2024-11-23 22:41:05 +01:00
12 lines
309 B
Python
12 lines
309 B
Python
|
import Adafruit_DHT
|
||
|
class Dht11(object):
|
||
|
def __init__(self,pin):
|
||
|
self.pin = pin;
|
||
|
def setValues(self):
|
||
|
self.humidity, self.temperature = Adafruit_DHT.read_retry(Adafruit_DHT.DHT11, self.pin)
|
||
|
def getLuftfeuchtigkeit(self):
|
||
|
return self.humidity;
|
||
|
def getTemperatur(self):
|
||
|
return self.temperature;
|
||
|
|