Chat freely about anything...

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
User avatar
By tytower
#18357 OK in case anyone wants this here is working Arduino IDE code for this ESP12
to send gathered data of BMP180 and DHT22 sensors to "data.sparkfun.com"

I've added an error LED so I can see that something is wrong. At this stage the I2C is not reading properly and I think the librarians are working on this atm

With this all connected up I still have two digital and one analog pins left free
Last edited by tytower on Sun Aug 16, 2015 4:05 pm, edited 2 times in total.