johnwargo / pi-weather-station-simple

Raspberry Pi Weather Station using simple sensor
MIT License
9 stars 4 forks source link

Always returning 32f (0c) and 2% hum #1

Open stefanmm opened 6 years ago

stefanmm commented 6 years ago

Hi, I can't get actual values from sensor (DHT11). Everything is connected both hardware and PWS. Data is being sending but only 0.0C and 2% hum, no real data. I changed GPIO in settings and set DHT11 also. Sensor is good because it works with Arduino UNO. I have RPi B+ model (2014).

johnwargo commented 6 years ago

When you say you set DHT11, does that mean you set the sensor object as shown below?

# create the sensor object
# Valid options are 'Adafruit_DHT.DHT11', 'Adafruit_DHT.DHT22', or 'Adafruit_DHT.AM2302'
sensor = Adafruit_DHT.DHT11

I didn't test the project with the DHT11 (I didn't have one on hand), so I don' t know. What GPIO port did you change it to? Are you sure you have the right one configured in the code? Remember, GPIO ports can be accessed through two different numbering schemes. I know the code works, so it has to be a configuration or hardware issue.

stefanmm commented 6 years ago

Hi, yes, I set like that sensor = Adafruit_DHT.DHT11 I use GPIO4 (pin 7), I point on it with black arrow: raspberry-pi-gpio-layout-model-b-plus-rotated-2700x900 In settings I set it to number "4" (also tried 7 but it says no data). I tried different GPIO, like 20, 23... every pin for data. I use same wires and wiring for Arduino and everything is working, so it's not hardware problem. I don't think it's RPi GPIO because I tried every one (data) pin. Maybe I need to prepare something else? I did only you say in readme file.

johnwargo commented 6 years ago

Hmmm, I don't know. I'm sorry. Have you tried different wires? A different Pi? Perhaps the board is bad?

H3wastooshort commented 5 years ago

Looks like you have a bad sensor or a wrong wireing...