Skip to content
/ sht4x Public

ESP-IDF component for the Sensiron SHT4x temperature and humidity sensor

License

Notifications You must be signed in to change notification settings

bitmandu/sht4x

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sht4x

This is an example ESP-IDF application for the Sensirion SHT4x temperature and humidity sensor.

Configuration

Edit main.c with the GPIO pins for your I²C SDA and SCL lines.

#define SDA GPIO_NUM_6
#define SDL GPIO_NUM_5

Example output

$ idf.py build flash monitor

ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
...
I (277) main_task: Calling app_main()
I (277) main: version 0.1.0
I (307) sht4x: found device 0x108906f5
** 0 23.285648 30.964981
** 1 23.277637 30.985962
** 2 23.253605 31.016479
I (15337) main: heating....
** 3 26.308460 31.390326
** 4 23.248264 30.987869
** 5 23.226902 31.052719
...

On the third iteration, the heating capibility of the SHT4x sensor is activated.

Plot

A Python script is provided to visualize the temperature and humidity in real-time.

$ ./scripts/plot.py

Real-time SHT4x sensor data

Component installation

See the component documunation to use this code as a component in your own project.

Help / Contributing

Bug reports and pull requests are very much encouraged.

License

MIT

About

ESP-IDF component for the Sensiron SHT4x temperature and humidity sensor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published