42% when it feels more like 77%. Enter the Si7021 Temperature + Humidity Sensor - the best way to prove the weatherman wrong! This lovely sensor for Silicon labs has ± 3% relative humidity measurements with a range of 0–80% RH, and ±0.4 °C temperature accuracy at a range of -10 to +85 °C.
Pinouts The Si7021 is a I2C sensor. That means it uses the two I2C data/clock wires available on most microcontrollers, and can share those pins with other sensors as long as they don't have an address collision. For future reference, the I2C...
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).
Adafruit_Blinka, our CircuitPython-for-Python compatibility library (https://adafru.it/BSN). CircuitPython Microcontroller Wiring First wire up a SI7021 to your board exactly as shown on the previous pages for Arduino. Here's an example of wiring a Feather M0 to the sensor with I2C: Board 3V to sensor VIN...
REPL (https://adafru.it/pMf)so you are at the CircuitPython >>> prompt. Python Installation of Si7021 Library You'll need to install the Adafruit_Blinka library that provides the CircuitPython support in Python. This may also require enabling I2C on your platform and verifying you are running Python 3.
That's all there is to using the Si7021 sensor with CircuitPython! Full Example Code import time import board import busio import adafruit_si7021 # Create library object using our Bus I2C port i2c = busio.I2C(board.SCL, board.SDA) sensor = adafruit_si7021.SI7021(i2c) while True: print("\nTemperature: %0.1f C"...
Need help?
Do you have a question about the Si7021 and is the answer not in the manual?
Questions and answers