Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temp Hum Press Sensorr not reading. #386

Open
texascanadasean opened this issue Dec 22, 2017 · 1 comment
Open

Temp Hum Press Sensorr not reading. #386

texascanadasean opened this issue Dec 22, 2017 · 1 comment

Comments

@texascanadasean
Copy link

texascanadasean commented Dec 22, 2017

I have the following sensor (https://www.dexterindustries.com/shop/temperature-humidity-pressure-sensor/) and I have been using the following code (https://github.com/DexterInd/GrovePi/blob/master/Software/CSharp/GrovePi/Sensors/DHTTemperatureAndHumiditySensor%20.cs) to read in from digital port 4.

I use the following code:

IDHTTemperatureAndHumiditySensor sensor = DeviceFactory.Build.DHTTemperatureAndHumiditySensor(Pin.DigitalPin4, DHTModel.Dht22);;

sensor.Measure();

double sensorTempC = sensor.TemperatureInCelsius;
double sensorTempF = sensor.TemperatureInFahrenheit;
double sensorhum = sensor.Humidity;

Is that the right code to use? I am getting NaN for all the values even if I use other ports.

I am trying to implement this for a client and at a stopping point.

Thanks in advance!!

Sean

@RobertLucian
Copy link
Contributor

I'm afraid that's not the code for the DI THP Sensor.

In order to get this thing going, you've got to install the dependencies for this sensor. The source code is here:
https://github.com/DexterInd/DI_Sensors.git
And the documentation for this particular sensor is found here:
https://di-sensors.readthedocs.io/en/master/api.html#temphumpress

I also encourage you to go through the "Getting Started" section in order to get a sense with what other products you can use it:
http://di-sensors.readthedocs.io/en/master/quickstart.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants