ESP8266/NodeMCU, Arduino IDE & SHT71 temp&humid sensor ...
Posted: Thu Feb 02, 2017 2:54 pm
Hi
I just got my NodeMCU and tried to get an Arduino sketch i have to run on it
Im using SHT71 temperature & humidity sensor that is working fine on my Arduino Pro mini (Leonardo)
I'm using same pin layout and get all zeros in NudeMCU
any ideas ?
this is the code, simple from their example
#include <Sensirion.h>
// library from https://github.com/spease/Sensirion
const uint8_t dataPin = 4;
const uint8_t clockPin = 5;
float temperature;
float humidity;
float dewpoint;
Sensirion tempSensor = Sensirion(dataPin, clockPin);
void setup()
{
Serial.begin(9600);
}
void loop()
{
tempSensor.measure(&temperature, &humidity, &dewpoint);
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.print(" C, Humidity: ");
Serial.println(humidity);
// Serial.print(" %, Dewpoint: ");
// Serial.print(dewpoint);
// Serial.println(" C");
delay(2000);
}
Thanks,
I just got my NodeMCU and tried to get an Arduino sketch i have to run on it
Im using SHT71 temperature & humidity sensor that is working fine on my Arduino Pro mini (Leonardo)
I'm using same pin layout and get all zeros in NudeMCU
any ideas ?
this is the code, simple from their example
#include <Sensirion.h>
// library from https://github.com/spease/Sensirion
const uint8_t dataPin = 4;
const uint8_t clockPin = 5;
float temperature;
float humidity;
float dewpoint;
Sensirion tempSensor = Sensirion(dataPin, clockPin);
void setup()
{
Serial.begin(9600);
}
void loop()
{
tempSensor.measure(&temperature, &humidity, &dewpoint);
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.print(" C, Humidity: ");
Serial.println(humidity);
// Serial.print(" %, Dewpoint: ");
// Serial.print(dewpoint);
// Serial.println(" C");
delay(2000);
}
Thanks,