Wrong temperature measurement with your demo

I am unable to measure correct temperature with the Cubecell HTCC-AB01 with the sample sketches from Heltec (ReadSHT2x.ino and BMP180basic.ino).

Regardless of whether I connect an SHT20/21 or a BMP180 sensor, the temperature is always measured way too high (+/- 45 degrees Celsius and not the actual 25 degrees Celsius). I have several sensors in stock and it doesn’t matter if I change them. I measured the Vext voltage, which is 3.29 volts. The same sensors work well on an Arduino Nano and Uno, so they are okay.

Can someone tell me if I am doing something wrong?

Thanks to the posting from dserrano (SHT20 Strange behavior) I was able to get the SHT sensor to work properly now using the uFire library. I recommend Heltec to change the demo sketch because it doesn’t work.

For others who run into this problem, below my working sketch:

#include “uFire_SHT20.h”
uFire_SHT20 sht20;

void setup()
{
Serial.begin(115200);
sht20.begin();
pinMode(Vext, OUTPUT);
Serial.println(“SHT-sensor Test”);
}

void loop()
{
digitalWrite(Vext,LOW);
Wire.begin();
delay(500);
float temperature = (float)(sht20.temperature());
float humidity = (float)(sht20.humidity());
Serial.print(temperature);
Serial.print(" C - “);
Serial.print(humidity);
Serial.println(” %");
Wire.end();
digitalWrite(Vext,HIGH);
delay(5000);
}

hi,

We will update this example code in the next two days.