Created
October 29, 2019 11:55
-
-
Save nkenna/048b38a606beb3fc10f1d069fa7addff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def getTemp(): | |
global temperature | |
global humidity | |
global tt | |
hum, tempe = Adafruit_DHT.read_retry(sensormodel, sensorpin) | |
humidity = hum | |
humidity = float("{:0.2f}".format(humidity)) | |
temperature = tempe | |
tt = tempe | |
temperature = float("{:0.2f}".format(temperature)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment