-->
Page 3 of 6

Re: DS18B20 not working

PostPosted: Tue Apr 07, 2015 1:22 am
by Dennis
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

Re: DS18B20 not working - edit: SOLVED

PostPosted: Tue Apr 07, 2015 5:51 am
by alain 06640
Hi Dennis, congratulations !
Could you upload your sketch ? It would help me and maybe, others...
I will try 4k7 and 1k6 and will keep you informed
Alain

Re: DS18B20 not working - edit: SOLVED

PostPosted: Tue Apr 07, 2015 6:42 am
by alain 06640
Dennis, did you check your 4k7 resistor with an ohmmeter ?

Re: DS18B20 not working - edit: SOLVED

PostPosted: Tue Apr 07, 2015 6:56 am
by alain 06640
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