Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By Dennis
#13715 No, I have not tried that.

Edit - actually now I HAVE tried wiring the ds18b20 differently, connecting data pin to GPIO02 and VCC to 3V3 without 4k7 pullup between, also tried GPIO0 instead of GPIO2 - all without success, it still is saying "no more devices" in endless loop. LED blink example works on both GPIOs.

Maxims DS18B20 datasheet says to connect the data pin via 4k7 pullup to vcc, so this is what I'm using.
And, as said: this setup works flawlessly with nodeMCU "out-of-the-box", so wiring must be OK. I do not see the point in changing the wiring? (power supply is good as well, just in case this will be next suggestion... ;) )

@phipli, which platform are you using?

UPDATE - got it working now, with a 1K6 pullup instead of the recommended 4K7 between VCC and Data. Maybe some weird power issue, maybe esp8266 uses more current when running arduino firmware as opposed to nodeMCU firmware?
Anyway, I'm happy now. Thanks to everybody for their help!


regards
User avatar
By alain 06640
#13742 if I compile this sketch with Arduino Uno card :
#include <OneWire.h>
void setup() {
}

void loop() {
}
No problem;
If I compile with generic ESP8266 card, I get this error :
In file included from sketch_apr07a.ino:1:0:
#error "Please define I/O register types here"
C:\Users\Alain\Dropbox\arduino sketches\libraries\OneWire/OneWire.h:108:2: error: #error "Please define I/O register
types here"
IDE 1.6.3, latest OneWire
Any ideas ?
Alain