![Adafruit Si7021 Скачать руководство пользователя страница 11](http://html1.mh-extra.com/html/adafruit/si7021/si7021_user-manual_2845846011.webp)
You can try breathing on the sensor to increase the humidity. The sensor reacts very fast!
Library Reference
The library we have is simple and easy to use
You can create the Adafruit_Si7021 object with:
There are no pins to set since you must use the I2C bus!
Then initialize the sensor with:
this function returns True if the sensor was found and responded correctly and False if it was not found
Once initialized, you can query the temperature in °C with
Which will return floating point (d fractional) temperature. You can convert to Fahrenheit by multiplying by 1.8
and adding 32 as you have learned in grade school!
Reading the humidity is equally simple. Call
to read the humidity also as a floating point value between 0 and 100 (this reads % humidity)
Adafruit_Si7021 sensor = Adafruit_Si7021();
sensor.begin();
sensor.readTemperature()
sensor.readHumidity()
© Adafruit Industries
https://learn.adafruit.com/adafruit-si7021-temperature-plus-humidity-sensor
Page 11 of 19