SI7021 Humidity Sensor (GY-21) [S068]
https://www.youtube.com/watch?v=ODBXsw91f_A
*GitHub : https://github.com/rdiot/rdiot-s068.git
* Specs
Precision Relative Humidity Sensor
± 3% RH (max), 0-80% RH
High Accuracy Temperature Sensor
±0.4 °C (max), -10 to 85 °C
0 to 100% RH operating range
Up to -40 to +125 °C operating range
Wide operating voltage (1.9 to 3.6 V)
Low Power Consumption 150 μA active current
60 nA standby current
Factory-calibrated
I2C Interface
Integrated on-chip heater
3x3 mm DFN Package
Excellent long term stability
Optional factory-installed cover
Low-profile
Protection during reflow
Excludes liquids and particulates
* Content
- Library : https://github.com/mlsorensen/SI7021
- Connect
VIN ----- 3.3V
GND ----- GND
SCL ----- SCL
SDA ----- SDA
- Key Code
#include <SI7021.h>
SI7021 sensor;
float temperature = sensor.getCelsiusHundredths();
temperature = temperature / 100.0;
int humidity = sensor.getHumidityPercent();
si7021_env data = sensor.getHumidityAndTemperature();
int t = data.celsiusHundredths;
int h = data.humidityBasisPoints;
lcd.setCursor(0,3);
lcd.print("t="+(String)t+" h="+(String)h);