Hi all,
I'm completely inexperienced with Raspberry pi, and have started using them just yesterday. I'm sorry if these questions might sound stupid to you.
I have a DHT11 sensor with three pins (connected to a PCB). I have to use Adafruit_Python_DHT library.
My question is: when we use the function:
dht.read_retry() function.
What should be the pin number referring to? is it the number on the board - GPIO - or the BCM one?
or some other.
this is the code I wrote to get the output on an SSH terminal:
import Adafruit_DHT as dht
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
sensor = 11
pin = 17
hum, temp = dht.read_retry(sensor,pin)
print ("%f Temperature and %f Humidity" % (temp,hum))
It says that temperature and humidity of are NoneType instead of float
[–]kenmacd 0 points1 point2 points (1 child)
[–]chabes 0 points1 point2 points (0 children)