upload NK edge code

This commit is contained in:
2020-07-13 19:42:32 +02:00
parent 52db1f209e
commit a2a6263eef
4 changed files with 275 additions and 0 deletions

9
EDGE_CODE/dht_22.py Normal file
View File

@@ -0,0 +1,9 @@
import Adafruit_DHT
class dht22:
def __init__(self):
self.dht_sensor = Adafruit_DHT.DHT22
self.dht_pin = 4
def get_humidity_temperature(self):
return Adafruit_DHT.read_retry(self.dht_sensor, self.dht_pin)