[SOLVED] Problems with Temperature and Humidity Sensor Pro

Hi,

I just received my new GrovePi with some sensors like the “Temperature and Humidity Sensor Pro”. I am currently trying to get this sensor working. I read lots of forum posts, tutorials (of course the getting started things) but I am not able to get values from the sensor.

  • I am using it with a raspberry pi 2
  • I already tried to upgrade to the latest firmware version (for grovepi as well as for the raspberry)
  • I am using the special raspian image from dexter industries
  • I tried running the python scrip that is located in “Desktop/GrovePi/Software/Python/grovepi.py”
  • I connected the sensor to D4
  • I also tried to connect to D7 and to adapt the sensor from 4 to 7 in the script

The only thing I get is for temp: “nan” and for humidity: “0.0”.

It seems the grovepi is detected fine as the firmware update was successful. Is there a possibility to find out if grovepi detects anything connected to D4? When I use a sensor pin in the script that is not in use at all I get the same result.

Thanks,

max

Executing firmware_version.py tells me that I am on firmware 1.2.2

Just tried the loudness sensor. Seems to work fine.

Hey,
I just tested the DHT sensor on the GrovePi that I have with the same settings and it is working. Can you check if you are using the proper settings from here: http://www.dexterindustries.com/topic/537-6c-displayed-in-home-weather-project/#post-4485 . If it still does not work, then the sensor might be broken.

-Karan

I solved this same problem. Change the “1” in the command line or a “0”. Or the other way around. Read the code: it depends on the platform, (A+, B, B+, B v 2) as to whether it’s a “1” or a “0”.

The DHT sensor is odd. Not sure why, but it tends to do things like block reads from the analog sensors, so be aware. (I have been experimenting with why… To be exact, I used a B+ to demonstration, convincingly that this is the case).

Any way we can start automatically detecting whether it should be a 1 or 0?

Hm, I think the sensor is broken.

Tried all things. I think I should require a 1 at the grovepi.dht method as I have the DHT 22 (AM 2302) sensor. What I was wondering a bit. The grovepi has analog inputs A0 to A2. And digial from D2 to D8.

When I use the 2 as sensor id. Does grovepi distinguish between them by the fact that I make a digial read or analog read? I was wondering a bit why the digital ports are not numbered from D0 to D6 and first thought to avoid a collision with the ids. But as the 2 is here twice this cannot be the reason…

I have several other sensors that all work fine (all of them are analog, gas sensor, air quality sensor, loudness sensor). However, I have another digital sensor, the IR distance Interrupter. With this one I also have problems. The light is always on and I get a value of 0 no matter of pointing the sensor somewhere without an obstacle within 3 meters or hiding the sensor with my hand in a distance of 2 centimeters. I tried it with maximum and minimum sensitivity on the sensor. Any ideas on that?

MAXpg,

The “0” or “1” is determined by the Raspberry Pi Model (read the DHT sensor code, as it has this in the comments).

I was pleased that when I changed it, it worked on:

A+
B+
B version 2

when the “0” or the “1” was correct.

P.S.,

I really love my Grove PI+ - I now own two. But the documentation, well, can be greatly improved. I’ve considered writing it up, myself and posting since the product is great. The external connectors and integration into python is SO much better than using a YUN or the other Raspberry PI hats out there…

P.S.,

I really love my Grove PI+ – I now own two. But the documentation, well, can be greatly improved. I’ve considered writing it up, myself and posting since the product is great. The external connectors and integration into python is SO much better than using a YUN or the other Raspberry PI hats out there…

Hey bigbuilder, that’s fantastic, we’re really glad you like it. And we’re always glad to hear suggestions. Can you tell us more about where we stumbled with the documentation? We’re constantly trying to make it better, and any more suggestions would be greatly appreciated. I think we discussed in another thread installation files; other than that, what else was confusing or hard or should we explain better?

John,

The documentation is all over the forum, in the “Getting Started” booklet, and on the website. They are not in one place. Also, they often conflict. At least one figure shows a connection that is different than the connection in the code. The DHT sensor needs a second parameter that is a “0” or “1”. The only place this is documented is in the code, itself. It would also be good to show the user how to update using git.

The documentation for the Grove Pi library is ???. A listing and description for each element (DHT, for example) would allow use beyond the nice examples given.

The inclusion of non-Grove Pi code is confusing to the novice user. Since the appeal of the nice Grove Pi is the ease of use, the documentation should be tailored to users that are easily confused.

I’ve enjoyed the hacking, and have learned much from struggling to get sensors to work on A+, B+ and B 2 versions of the Pi. But the casual user need one stop shopping for documentation, and that documentation should be 100% accurate.

I must say that the little booklet is nice - it’s just that it doesn’t all work, depending on what firmware and Grove PI software release you have.

Don’t get me wrong: I really like the product, and I’ve got it into pretty good shape. But I’m an electrical engineer with a lot of coding experience.

Hope this is constructive and helps!

Just wanted to mention that I ordered a new sensor and now it works. So the sensor itself had a defect. Thanks for your help!

Great news! Glad to hear it wasn’t the hardware or the software, I’m glad we have this worked out.