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

swapped values #1

Closed
massimopalmieri opened this issue May 23, 2014 · 4 comments
Closed

swapped values #1

massimopalmieri opened this issue May 23, 2014 · 4 comments

Comments

@massimopalmieri
Copy link

I don't know if it depends on the sensor, but I use a DHT 11 and readout.temperature returns the humidity while readout.humidity returns the temperature

@momenso
Copy link
Owner

momenso commented May 23, 2014

Really? That is odd... I suspect it is being swapped in the sensor readout value because I tried with a few sensors but all from the same manufacture, probably same batch also.

@momenso
Copy link
Owner

momenso commented May 23, 2014

Have you tried other means of reading the sensor before? Because the raw value from the sensor is read from a memory buffer based on a fixed offset defined on the manufacture's specification I did not expect this to change.

Anyway... we could add an optional parameter in the initialise function to swipe the values, if needed.

@massimopalmieri
Copy link
Author

this is what is logged with the example script:

Temperature: 62.00C, humidity: 25.00%

while if I test the sensor with this (https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/tree/master/Adafruit_DHT_Driver) I get:

Temp = 25 *C, Hum = 62 %

@olekenneth
Copy link
Contributor

This PR fixes this issue. #5

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

No branches or pull requests

3 participants