Problem with the Temp Hum Sensor


#1

First of all: I am new to the GrovePi and to Python programming. So I want to apologize for asking stupid questions :wink:
I connected the GrovePi+ to the RaspberryPi and used the “Setting Up the Software” Guide to get it ready. As the command “sudo i2cdetect -y 1” shows everything is installed correctly. I connected the Temperature and Humidity Sensor to the board on port D7. Afterwards I tried to run the test code (https://github.com/DexterInd/GrovePi/blob/master/Projects/Home_Weather_Display/Home_Weather_Display.py). Instead of the Temparature and Humidity values I get this output:

Traceback (most recent call last): File "home_temp_hum_display.py", line 31, in <module> from grovepi import * ImportError: No module named grovepi

What went wrong? How can I solve this issue?
Thank you in advance for your help :slight_smile:


#2

What operating system are you using? Are you using Dexter Industries Raspbian for Robots or another version of Raspbian?

Also, if you’re using your own version (not the Dexter Industries version) did you install the GrovePi library?


#3

I am using an OSMC Mediacenter. How do I get the GrovePi library installed?

I just tried the “Connect your computer to the GrovePi” Manual and could also not get a connection from my computer to http://dex.local. Maybe that helps :slight_smile:
Command line works fine for me, no need for a GUI.


#4

So I’m not familiar with OSMC Mediacenter’s image. You might be best served using Raspbian for Robots or straight Raspbian.

So to confirm, you ran this: http://www.dexterindustries.com/GrovePi/get-started-with-the-grovepi/setting-software/

And which step did you have trouble with?


#5

Thanks for the reply :slight_smile: I just tested the Raspbian for Robots version. Everything works fine, except I get much too high values for temp and hum:

e.g.
temp = 588.8 C hum = 256.0 %

What is the problem?


#6

Can you add a link to the temperature and humidity sensor that you are using and also to the example code that you are using to read from it.

-Karan


#7

I bought this sensor: http://www.seeedstudio.com/wiki/Grove_-_Temperature_and_Humidity_Sensor

I used this code: https://github.com/DexterInd/GrovePi/blob/master/Projects/home_temp_humi_display/home_temp_hum_display.py
I commented out all lines that use the oled display. The code is attached :slight_smile:


#8

same code, bus this time a .txt file


#9

The blue sensor uses a different parameter. Can you update the dht(dht_sensor_port,1) to dht(dht_sensor_port,0) on line 45 here:https://github.com/DexterInd/GrovePi/blob/master/Projects/home_temp_humi_display/home_temp_hum_display.py#L45 and try again to see if it is any better.

-karan