upload NK edge code
This commit is contained in:
9
EDGE_CODE/dht_22.py
Normal file
9
EDGE_CODE/dht_22.py
Normal 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)
|
||||
Reference in New Issue
Block a user