Temperature and Humidity Sensor Pro

Hi,

I have purchased a Temperature and Humidity Sensor Pro.

I’m using a simple script to output the value :

import grovepi
print grovepi.dht(1,1)

Each time I run the script, I get the following print out :

[nan, nan]

The Temp / Humidity Sensor is connected to A1.

Hi,
Please try connecting the Temp sensor to digital port 4 and use this example to test it https://github.com/DexterInd/GrovePi/blob/master/Software/Python/grovepi_dht.py .

If it still does not work then most probably you don’t have the updated firmware on the Grove Pi. Use http://www.dexterindustries.com/GrovePi/get-started-with-the-grovepi/updating-firmware/ to update the firmware on the GrovePi and try again.

Thanks,
Karan

Karan,

It still reads out [nan,nan] from the sensor on port D4.

Strange, I only just received the GrovePi in the post yesterday. Should it not already have the most up to date firmware installed?

Thanks

Hi,
We are getting a new batch of GrovePi’s with updated Firmware but cannot be sure if you have the one with the new firmware or the old one. Please do try updating the firmware once.

Sorry for the incontinence.

-Karan

Hi there, My setup (DHT Pro on D4) has the same symptoms. I just received the Grove Pi from Dexter’s fulfillment from Amazon (http://www.amazon.com/dp/B00I3VN3RA/ref=pe_385040_30332200_TE_item). Could it be that you guys still have Grove Pi’s with old firmware at the Amazon fulfillment center?

Yup, I just updated the firmware and now dht python is working correctly.

Sorry for all the troubles and great to hear that you were able to get it to work.

Dear Karan,
I have plugged my “Temperature&Humidity Sensor (High Accuracy and mini) v1.0” on D4 (but I have tried D8-D7-D3-D2-A0). The output I receive is always the same:
temperature nan humidity 0.0

>python GrovePi/Software/Python/grove_version_check.py
1.2.2

I have tried different values for the dht second parameter.
I have tested other sensors (light sensor,luminance)using the analogic ports (A0-A1-A2) they work (using grovepi.analogRead(0), etc)


[temp,humidity] = grovepi.dht(sensor,0)
print "0:temperature ",temp, "humidity ",humidity
time.sleep(1)
if math.isnan(temp) or math.isnan(humidity):
   [temp,humidity] = grovepi.dht(sensor,1)
   print "1:temperature ",temp, "humidity ",humidity
   time.sleep(1)
if math.isnan(temp) or math.isnan(humidity):
   [temp,humidity] = grovepi.dht(sensor,2)
   print "2:temperature ",temp, "humidity ",humidity
   time.sleep(1)
if math.isnan(temp) or math.isnan(humidity):
   [temp,humidity] = grovepi.dht(sensor,3)
   print "3:temperature ",temp, "humidity ",humidity
   time.sleep(1)

(note this program has been run consecutively several times)
Thanks for any help.

Hey,
If this is the sensor that you are trying to use: http://www.seeedstudio.com/depot/Grove-TemperatureHumidity-Sensor-HighAccuracy-Mini-p-1921.html , then it is not going to work with the example that you are trying out because the example is for Grove DHT Humidity and Temperature sensor pro.

The sensor that you are trying to use can be connected to the I2C port but there is no code available to read/write the sensor. You might have to port the arduino library to work with the python code.

-Karan

Dear Karan,
Thanks for your prompt reply. One more question: How do I know if a sensor should/has to be plugged in the digital/analog/i2c/etc socket ?

May this could help:

http://www.dexterindustries.com/forum/?reply=4169

Sernsor showed wrong reading:
root@raspberrypi:/home/pi/Desktop/GPIO/iot/GrovePi-master/Software/Python# python grove_dht_pro.py
temp = 588.8 humidity = 1561.6
temp = 588.8 humidity = 1587.2
temp = 588.8 humidity = 1561.6
temp = 588.8 humidity = 1561.6
temp = 588.8 humidity = 1561.6
temp = 588.8 humidity = 1561.6
temp = 588.8 humidity = 1561.6
temp = 588.8 humidity = 1561.6
temp = 588.8 humidity = 1561.6
temp = 588.8 humidity = 1561.6

I have tried more than 3 TEMP & HUMI sensors (i bought alot) and also with diffrent digital port. what happen?

Hey,
The reading might be wrong because the function takes an argument to select what type of sensor you are using. Can you add a link to the sensor that you are using.

Also, here is another post on the forums which does desribe the different sensors and how to use them: http://www.dexterindustries.com/forum/?topic=537-6c-displayed-in-home-weather-project/#post-4485 .

-Karan

Yeah it work like charm. I’m using the GrovePi+ with a DHT11 (blue one).
i have change [temp,hum] = dht(dht_sensor_port,1)
to
[temp,hum] = dht(dht_sensor_port,0) # for DHT11

Tq for quick advice. Tq karan.