Weird behaviour on SHT41
I'm making a weather station using
ESP32
SHT41
BMP280
GUVA-S12SD
but SHT41 seems to always give weird values like 48.39269 in both temperature and humidity, sometimes temperature and humidiy is different but usllay it's the same or very close

3 Replies
This is the wiring

kinda hard to check wiring based on that pic...
does the SHT41 behave correctly with it's example code?
https://github.com/adafruit/Adafruit_SHT4X
very similar
#include "SHT41.h"
SHT::SHT() {
}
void SHT::setup()
{
Serial.println(F("SHT41 test"));
if (!sht.begin()) {
Serial.println("Could not get data from SHT41, make sure you're using the correct sensor and wiring");
}
sht.setPrecision(SHT4X_HIGH_PRECISION);
Serial.println("-- TEST usage --");
Serial.println();
}
SHTData SHT::getValues()
{
sensors_event_t temp, hum;
sht.getEvent(&temp, &hum);
return { temp.temperature, hum.relative_humidity };
}
void SHT::printValues()
{
SHTData data = getValues();
Serial.println("SHT41: ");
Serial.println("Temperature: ");
Serial.println(data.temperature);
Serial.println("℃");
Serial.println();
Serial.println("Humidity: ");
Serial.println(data.humidity);
Serial.println("%");
}