Skip to content

Commit

Permalink
Switched from DHT11 to DHT22
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Rigler committed Dec 14, 2021
1 parent b0866bd commit 1f09285
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
GPIO.setmode(GPIO.BCM)
GPIO.setup(LED_PIN_GR, GPIO.OUT)
GPIO.setup(LED_PIN_YE, GPIO.OUT)
DHTSensor = Adafruit_DHT.DHT11
DHTSensor = Adafruit_DHT.DHT22


def is_cnx_active(timeout):
Expand Down Expand Up @@ -57,7 +57,7 @@ def get_co2():

def get_temperature_humidity():
_humid, _temper = Adafruit_DHT.read_retry(DHTSensor, SENSE_PIN)
return _humid, _temper
return round(_humid, 2) + 30, round(_temper, 2)


def send_data(data):
Expand Down

0 comments on commit 1f09285

Please sign in to comment.