Can someone please assist.
i'm trying to read temperature/humidity data with my mega 2560 + fs2000-sht20 sensor, but all get is the 998 error. also used a 12c check and no 12c was found. however my circuit is sound, i have tried multiple voltage and current inputs between the 3.3 to 5 v range of my sensor. I have used 6 different sensors!!! surely they cannot all be damaged. the pull up resistors and capacitor is imbedded in the sensor itself.
here is a link to the sensor: https://www.amazon.com.be/-/en/FS200-SHT20-Humidity-Temperature-Greenhouse-Nursery/dp/B08RBH3Z6R?language=en_GB
here is my code:
DFRobot_SHT20 sht20(&Wire, SHT20_I2C_ADDR);
void setup()
{
Serial.begin(115200);
// Init SHT20 Sensor
sht20.initSHT20();
delay(100);
Serial.println("Sensor init finish!");
/**
- Check the current status information of SHT20
- Status information: End of battery, Heater enabled, Disable OTP reload
- Check result: yes, no
*/
sht20.checkSHT20();
}
void loop()
{
/**
- Read the measured data of air humidity
- Return the measured air humidity data of float type, unit: %
*/
float humd = sht20.readHumidity();
/**
- Read the measured temp data
- Return the measured temp data of float type, unit: C
*/
float temp = sht20.readTemperature();
Serial.print("Time:");
Serial.print(millis()); // Get the system time from Arduino
Serial.print(" Temperature:");
Serial.print(temp, 1); // Only print one decimal place
Serial.print("C");
Serial.print(" Humidity:");
Serial.print(humd, 1); // Only print one decimal place
Serial.print("%");
Serial.println();
delay(1000);
}
I have seen many examples of this working. please advise on what is my issue.
