![Adafruit Si7021 Скачать руководство пользователя страница 9](http://html1.mh-extra.com/html/adafruit/si7021/si7021_user-manual_2845846009.webp)
Arduino Code
You can easily wire this breakout to any microcontroller, we'll be using an Arduino. For another kind of microcontroller,
just make sure it has I2C, then port the code - its pretty simple stuff!
Connect Vin to the power supply, 3-5V is fine. Use
the same voltage that the microcontroller logic is
based off of. For most Arduinos, that is 5V
Connect GND to common power/data ground
Connect the SCL pin to the I2C clock SCL pin on
your Arduino. On an UNO & '328 based Arduino,
this is also known as A5, on a Mega it is also
known as digital 21 and on a Leonardo/Micro,
digital 3
Connect the SDA pin to the I2C data SDA pin on
your Arduino. On an UNO & '328 based Arduino,
this is also known as A4, on a Mega it is also
known as digital 20 and on a Leonardo/Micro,
digital 2
https://adafru.it/rAA
https://adafru.it/rAA
The Si7021 has a default I2C address of 0x40 and cannot be changed!
Install Adafruit_Si7021 library
To begin reading sensor data, you will need to
install the Adafruit_Si7021 library (code on our github
repository)
(https://adafru.it/rAw)
. It is available from the Arduino library manager so we recommend using that.
From the IDE open up the library manager...
And type in adafruit si7021 to locate the library. Click Install
© Adafruit Industries
https://learn.adafruit.com/adafruit-si7021-temperature-plus-humidity-sensor
Page 9 of 19