Author Options:

call to SHT10 returns invalid numbers in serial monitor? Answered

I have the NodeMCU ESP8266 on solderless breadboard (photo attached). Regardless of whether I have the SHT10 connected or not I get unreasonable numbers for temperature and humidity (see attached serial monitor output). Seems like the calls to the SHT10 are not going through.

I'm using the code you posted that starts:
#define dataPin 12 // NodeMCU pin D6
#define clockPin 14 // NodeMCU pin D5
SHT1x sht1x(dataPin, clockPin); // instantiate SHT1x object

void setup()
Serial.begin(38400); // Open serial connection to report values to host
Serial.println("Starting up");
Reading through the SHT1x Arduino Library from Practical Arduino's github page documentation it looks like I should get -40 for temp if there is a com error with the SHT10 but instead I get the numbers in the attached figure both with and without the SHT10 attached.

The SHT10 is getting 3.3 volts on its red lead. Is there a way to tell if it is actually communicating with the ESP8266?

any help would be appreciated.

p.s. In Arduino 1.85 I had to specify that I was using the NodeMCU 1.0 (ESP-12E Module), as recommended by the manufacturer. Using the Adafruit ESP8266 Huzzah board type resulted in no results at all in the serial monitor.