Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By Dennis
#13756 Hello,

I used only the "DS18x20" example sketch.
But you said you got an error regarding IO registers? This means your IDE is using the "normal" OneWire" library located under your "Documents\arduino\libraries" folder, instead of the modified library located in your arduino program folder... (for me, this would be c:\arduino-1.6.1-esp8266\libraries\OneWire for the modified library, and NOT c:\users\dennis\documents\arduino\libraries\OneWire which is the wrong one!!).

(you can see which library path is used, when you enable verbose output for compiling in the arduino IDE, and check the output when testing the sketch). If the library used is the original one, it will fail. In this case I recommend to remove the original "OneWire" folder from your user arduino folder, then restart IDE - and it will use the modified OneWire library.

regards
User avatar
By alain 06640
#13903
Dennis wrote:@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

Hi Dennis, I was using Roger Clarke approach which, apparently, does not deal with libraries modified for ESP.
With arduino-1.6.1-p1-windows, 18B20 works fine. 3.3 kohm to 3.3 V, about same current as 4.7kohm at 5 V
Thank you for your help
Alain
User avatar
By Stevenelson
#17503 I have been struggling with this exact same problem all day long.

I am finally able to locate the device with onewire, but now the temperature value doesn't make any sense.

Before it was always display: -127.00

Now it seems to always display 127.94

Has anyone seen similar results?
User avatar
By StarkJohan
#18849 I also get 127.94 celsius pretty consistently when using parasitic powering of the sensor, I really don't understand why though. Try normal power mode, it works just fine for me and the actual power consumption in deep sleep is the same (at least regarding to my el cheapo multimeter reading 0.735mA with the LED still attached on the olimex board).