-->
Page 1 of 1

nodemcu + ds18s20

PostPosted: Wed Nov 04, 2015 10:54 am
by hygy
Hi,

I'm trying to wire up a nodemcu with ds18s20, but it is not found the sensor. DS18S20 is connected to 3.3V and GND between the 3.3V and DATA line I connected a 4k7 resistor. Data line connected to ~D3 port.

What i'm doing wrong?

Code: Select allvar GPIO0 = new Pin(0); // GPIO0 | ~D3 port

var ow = new OneWire(GPIO0);

var sensor = require("DS18B20").connect(ow);

console.log('sensor getting data');

setInterval(function() {
  console.log(sensor.getTemp());
}, 1000);


I'm getting null for sensor.getTemp();

Code: Select all>ow.search();
=[  ]

Re: nodemcu + ds18s20

PostPosted: Thu Nov 05, 2015 5:33 am
by hygy
we need this line now, and it is working:

require("ESP8266").logDebug(false);

Re: nodemcu + ds18s20

PostPosted: Thu Nov 05, 2015 11:54 am
by kolban
Excellent find ... we'll change the debugging to be default off.