#include < Wire.h >
#include < Adafruit_SHT4x.h >
// Create an instance of the SHT4x sensor
Adafruit_SHT4x sht40;
// Pin for analog output (A0)
#define ANALOG_OUTPUT_PIN A0
void setup() {
// Initialize Serial Monitor
Serial.begin(115200);
while (!Serial) {
delay(10); // Wait for the Serial Monitor to open
}
// Initialize the sensor
if (!sht40.begin()) {
Serial.println("Couldn't find SHT40 sensor!");
while (1) {
delay(10);
}