Skip to content

About

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

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

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

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages