Hello everyone,
I’m encountering an issue with the Grove Temperature and Humidity Sensor (High Accuracy AndMini-v1.0) when using it with an Arduino Uno. The sensor is giving me strange readings - it shows -50.00°C for temperature and -24.00% for humidity.
I’ve checked my code and connections, but I’m still getting these incorrect values. Has anyone else experienced this issue before? If so, do you know what might be causing it and how to fix it?
This is the code I used :
#include <TH02_dev.h>
#include “Arduino.h”
#include “Wire.h”
#include “THSensor_base.h”
#define ShowSerial Serial
#ifdef AVR
#include <SoftwareSerial.h>
SoftwareSerial SSerial(2, 3); // RX, TX
#define COMSerial Serial
#define ShowSerial Serial
TH02_dev TH02;
#endif
#ifdef ARDUINO_SAMD_VARIANT_COMPLIANCE
#define COMSerial Serial1
#define ShowSerial SerialUSB
TH02_dev TH02;
#endif
#ifdef ARDUINO_ARCH_STM32F4
#define COMSerial Serial
#define ShowSerial SerialUSB
TH02_dev TH02;
#endif
void setup() {
ShowSerial.begin(9600); // start serial for output
ShowSerial.println("****TH02_dev demo by seeed studio****\n");
/* Power up,delay 150ms,until voltage is stable */
delay(150);
/* Reset HP20x_dev */
TH02.begin();
delay(100);
/* Determine TH02_dev is available or not */
ShowSerial.println("TH02_dev is available.\n");
}
void loop() {
float temper = TH02.ReadTemperature();
ShowSerial.print("Temperature: ");
ShowSerial.print(temper);
ShowSerial.println("C\r\n");
//Serial.print("%\t");
float humidity = TH02.ReadHumidity();
ShowSerial.print("Humidity: ");
ShowSerial.print(humidity);
ShowSerial.println("%\r\n");
delay(1000);
}
I appreciate any help or insights you can provide!
Thank you.