10000 Need testing on arduino platforms with different sensor types. · Issue #1 · ADiea/libDHT · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Need testing on arduino platforms with different sensor types. #1

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

Open
ADiea opened this issue Jul 4, 2015 · 10 comments
Open

Need testing on arduino platforms with different sensor types. #1

ADiea opened this issue Jul 4, 2015 · 10 comments

Comments

@ADiea
Copy link
Owner
ADiea commented Jul 4, 2015

Hi guys and girls,
This lib needs people with some spare time and Arduino hardware to help test it. Comments are welcome
Cheers!

@Maxr1998
Copy link

Hi @ADiea, I am using a SainSmart Mega2560 and a SainSmart AM2302 sensor (DHT22 variant), but your library sadly returns 0.00 for temp and humidity. It probably connects fine, because when it's disconnected, it reports an error. Secondly, the lib from @RobTillaart gives me normal values..
I still like yours better, because it has dewpoint calculation :)

@ADiea
Copy link
Owner Author
ADiea commented Jul 22, 2015

Hi @Maxr1998 please enable debug in dht.h and tell me what you get on the console. I also use the AM2302 sensor for testing.

#define DHT_DEBUG 1

Thanks

@ADiea
Copy link
Owner Author
ADiea commented Jul 23, 2015

Make sure to use the latest code, I fixed some cornercases

@Maxr1998
Copy link

@ADiea this is my log output atm:

libDHT: Detected DHT-22 compatible sensor.
40
0, 0, 0, 0, 0 =? 0
Temperature: 0.00
Humidity: 0.00
Dew point: nan

Here's my code, just to be sure:

#include "DHT.h"

#define DHTPIN 5

TempAndHumidity th;

DHT dht(DHTPIN);

void setup() {
  Serial.begin(9600);
  Serial.println("DHT22 test");

  dht.begin();
}

void loop() {
  delay(2000);

  if(!dht.readTempAndHumidity(th)) {
    Serial.print("Failed to read from DHT sensor for reason: ");
    switch(dht.getLastError())
    {
      case errDHT_Timeout:
         Serial.print("TIMEOUT (no sensor?) \n");
      break;
      case errDHT_Checksum:
         Serial.print("CHECKSUM (are cables secured?) \n");
      break;
      case errDHT_Other:
         Serial.print("UNKNOWN \n");
      break;
    };
    return;
  }
  Serial.print("Temperature: ");
  Serial.println(th.temp);
  Serial.print("Humidity: ");
  Serial.println(th.humid);
  double dp = dht.getDewPoint(DEW_ACCURATE);
  Serial.print("Dew point: ");
  Serial.println(dp);
}

Also, it seems the Arduino IDE doesn't know debugf(), or is my Version just to old (1.5.6 r2)?

@ADiea
Copy link
Owner Author
ADiea commented Jul 24, 2015

Looking at your sensor's picture on the internet it seems it already has a pullup....

In dht.cpp try replacing the line

PULLUP_PIN(m_kSensorPin); 

with

pinMode(m_kSensorPin, INPUT);

and write back if this helps...

@Maxr1998
Copy link

@ADiea
Nope, sorry, still the same.
And yes, it already has pullup resistor, I am using this one.

@ADiea
Copy link
Owner Author
ADiea commented Jul 28, 2015

Unfortunately I have no other idea at the moment I will try comparing the code to Rob's when I have some free time.

@Maxr1998
Copy link

Ok, thanks for your efforts though :)

@Maxr1998
Copy link
Maxr1998 commented Dec 5, 2015

Any updates?

@ADiea
Copy link
Owner Author
ADiea commented Dec 5, 2015

Nothing yet sorry. I am planning a clean-up and a bit of restructuring of the code to make it simpler but 5B12 not on the priority list unfortunately - so can't promise anything yet

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

2 participants
0