Skip to content

A micropython library to measure humidity & temperature data from the htu21d sensor on ESP32

Notifications You must be signed in to change notification settings

Kleity/HTU21D-Micropython-ESP32

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

HTU21D Micropython ESP32

This is a micropython library to measure humidity & temperature data from the htu21d sensor on ESP32

Example

This code works on ESP32 and it should be the same for ESP8266.

As the ESP32 has the I2C pins in SCL=22 and SDA=21, you should connect the sensor pins in the same way, here is an example of how to make it run once the library has been charged to the microcontroller:

lectura = HTU21D(22,21)
hum = lectura.humidity
temp = lectura.temperature
print('Humedad: ', + hum)
print('Temperatura: ', + temp)

About

A micropython library to measure humidity & temperature data from the htu21d sensor on ESP32

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published