Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By alain 06640
#13648 Hi Dennis,
I try the same thing as you do, but I do not find the OneWire library for esp8266. How did you get it ?
Thanks for helping,
Alain (from France)
User avatar
By Dennis
#13664 Yep, tried the new IDE also on second platform (win7 x64), but got the same result with out-of-the-box example sketch - sensor is not found.

Supply voltage to the esp8266 is 3344mV, the ds18b20 is wired to GPIO2 with additional 4,7k pullup resistor between Vcc and GPIO2. From the power supply perspective everything must be ok, as I am currently running the esp module with nodeMCU firmware and can read the ds18b20 properly with lua script, no problems with nodeMCU firmware.

With nodeMCU it works, with new Arduino IDE it does not work.

It compiles, but it does not find the sensor. I am using pin2, which I think should correspond to GPIO2. right?

@Alain, the library is in the libraries folder inside the arduino ide folder. Just add "#include <OneWire.h>" as first line in your sketch.

regards
User avatar
By MrZANE
#13680
Dennis wrote:Hello all,

I've problems getting the OneWire library to work. I downloaded the 1.6.1 IDE windows from the github repo, erased the onewire folder in users\me\documents\arduino\libraries, and the new IDE is using the proper customized version of OneWire.h for esp8266, the one that was included in the esp8266 arduino IDE download.

Still, every example of onewire ds18x20 temperature readout I try, as well as every example of dallastemperaturecontrol.h, only gives a temperature reading of "0.0" or says "no more addresses"...

I have attached the ds18b20 to GPIO2, the data pin pulled to VCC via 4k7 resistor, and I am using esp-01 module...

Webserver example runs fine, just not the ds18b20 sensor.

I suspected a broken sensor, or faulty wiring, BUT with different firmware from here (and with identical hardware, wiring, same sensor), http://homes-smart.ru/index.php/oborudo ... arodmon-ru

the esp shows the device address and gives correct reading of the ds18b20, so it must be some software issue...

Any ideas? Has Anyone got ds18b20 working?

regards

Dennis


Have you tried to not use parasitic power (Power via pull-up resistor) and power the DS1820 directly?
This could be the differance between your and phipli's setup maybe.

Kind regards
Jimmy