Sensor Si7021 with Arduino

arduino Si7021 sensor temperature humidity

Display humidity and temperature values with sensor Si7021 and Arduino.

Code

Download code
#include "Adafruit_Si7021.h"

Adafruit_Si7021 sensor = Adafruit_Si7021();

void setup() {
  Serial.begin(9600);

  if (!sensor.begin()) {
    Serial.println("Did not find Si7021 sensor!");
    while (true) {}
  }

  delay(1000);
}

void loop() {
  Serial.print("\nHumidity:    ");
  Serial.print(sensor.readHumidity());
  Serial.println(" RH%");

  Serial.print("Temperature: ");
  Serial.print(sensor.readTemperature());
  Serial.println(" C");

  delay(1000);
}

Serial console

Serial output from the firmware.

Sensor Si7021 with Arduino serial console

Schematic

Wire up the hardware accordingly

Sensor Si7021 with Arduino schematic

References