ESP32 - Temperature/humidity Sensor (Si7021) and OLED
by Petus in Circuits > Arduino
5432 Views, 6 Favorites, 0 Comments
ESP32 - Temperature/humidity Sensor (Si7021) and OLED
Other article about ESP32. We again connect ESP32 to temperature/humidity sensor Si7021 (HTU21), but today we also connect OLED where will be showed data from sensor. The OLED has 128x64px resolution and communication bus is I2C as well as Si7021.
Thanks dfrobot.com for ESP32.
I thank designer of SunDuino ESP32 board.
Other parts with ESP32:
ESP32, SunDuino and temperature/humidity sensor Si7021 (HTU21)
OLED Display and Library (adafruit)
I can choose what bus I will use, because my OLED display has SPI and I2C bus as well. If you have OLED display with I2C you have to know what is OLED address. In my case, the address of OLED is 0x3C.
The arduino library for OLED is on adafruit.
The arduino library for Si7021 is available on https://learn.sparkfun.com/tutorials/si7021-humidity-and-temperature-sensor-hookup-guide
Si7021 and OLED Connection to I2C Bus
Connecting of Si7021 sensor, OLED with SunDuino ESP32 is easy.
You have to connect 3V3, GND, SDA of Si7021, OLED to SDA of ESP32 (21 pin) and SCL to SCL of ESP32 (22 pin).
OLED display needs RESET pin, the RESET pin of OLED is connected to 19th pin of SunDuino ESP32.
The code is available on https://github.com/petus/ESP32_SunDuino_Si7021_OL...