Chat freely about anything...

User avatar
By tytower
#17708 Thanks I suspected as much and I think you use a diferent library to me too . I could not find such a function. However in my library have a look at what I found when I went looking !!


unsigned long startTime = millis();
if ( (unsigned long)(startTime - lastReadTime) < (model == DHT11 ? 999L : 1999L) ) {
return;
}
lastReadTime = startTime;

temperature = NAN;
humidity = NAN;

// Request sample

digitalWrite(pin, LOW); // Send start signal
pinMode(pin, OUTPUT);
if ( model == DHT11 ) {
delay(18);
}
else {
// This will fail for a DHT11 - that's how we can detect such a device
delayMicroseconds(800);
}


Thats what I am getting nan sent to the data.sparkfun.com
User avatar
By tytower
#17726
P1010015.JPG
Well I've got the DHT22 sensor up and my line was
#define DHT_PIN 2 //DHT dht;//DHT22 for my sensorRHT03-others in library
DHT dht(DHT_PIN,DHT22,15);

I had to get the adafruit library though as the standard library from Arduino does not have the functions needed
https://github.com/adafruit/DHT-sensor-library Their getTemperature() becomes readTemperature() and getPressure() becomes readPressure().

This also confirms the reading pin 2 Which is GPIO5 on the ESP-12 board
Now to see what I can do with the BMP180 which I may have to replace . I suspect I bricked it with 5 V instead of 3.3V .

Il'l let it run now for a bit
Here is where its posting to
https://data.sparkfun.com/streams/RMzp9ANyqzfjw4drzNnZ
Last edited by tytower on Mon May 18, 2015 4:27 am, edited 6 times in total.
User avatar
By tytower
#17727
burkmurray wrote:I had to add a timing value to the DHT initialization to adjust for the faster processor on the ESP12 vs Uno:
Code: Select allDHT dht(DHTPIN, DHTTYPE, 15);

A value of 11 worked for me, but https://github.com/esp8266/arduino suggests using 15.
Good luck!

Thanks again mate -used 15 as 11 didn't work