esp-idf adding custom component library
Posted: Sun Dec 24, 2023 8:41 pm
Hello, I am trying to add custom DHT-11 library to already existing esp-idf project. I am working on VScode. I created folder named 'components', inside created another 'dht_11', then added dht11.c and CmakeLists.txt files and included dht11.h inside include folder of this component. I tried including .h file inside main, but compiler cant find it, tried building project and got huge amount of errors, but I think main one is that dht11.h file is not found. I edited Cmake file like documentation of build system showed:
Maybe someone can help with this? What are the steps of adding or creating custom driver library? As I understood, it should be added to component folder, but it seems that my project doesn't recognize this component folder.
Code: Select all
idf_component_register(SRCS "dht11.c"
INCLUDE_DIRS "include"
REQUIRES mbedtls)