This shows you the differences between two versions of the page.
Next revisionBoth sides next revision | |||
dh22 [2021/12/14 22:32] – created admin | dh22 [2021/12/19 20:58] – admin | ||
---|---|---|---|
Line 2: | Line 2: | ||
<code python> | <code python> | ||
- | #!/usr/bin/python | + | #!/usr/bin/python3 |
import os, sys | import os, sys | ||
Line 22: | Line 22: | ||
sensor = Adafruit_DHT.DHT22 | sensor = Adafruit_DHT.DHT22 | ||
- | # The GPIO17 - Board number | + | # The GPIO17 - Board number |
- | pin = '17' | + | pin = '2' |
humidity, temperature = Adafruit_DHT.read_retry(sensor, | humidity, temperature = Adafruit_DHT.read_retry(sensor, |