ESP32S3

发布于 2024-06-27  111 次阅读


vTaskDelay(1000 / portTICK_PERIOD_MS);//延迟1000ms

下载时USB端口权限问题(Linux)

Permission denied: '/dev/ttyUSB0'
临时的解决方法sudo chmod 777 /dev/ttyUSB0
一劳永逸的方法sudo usermod -aG dialout usrname
usrname替换成ubuntu的用户名,然后重启系统即可
参考

给工程新增文件夹与源文件

components
    ads1115_driver
        ads1115_driver.c
        ads1115_driver.h
        CMakeLists.txt
main
    main.c
    CMakeLists.txt
CMakeLists.txt

//CMakeLists.txt in Folder ads1115_driver (case one file)
idf_component_register(SRCS "ads1115_driver.c" 
                    INCLUDE_DIRS ".")
//CMakeLists.txt in Folder ads1115_driver (case mutiple file)
idf_component_register(SRCS "file1.c" "fileN.c" 
                    INCLUDE_DIRS "path1" "pathN") 

参考

最后更新于 2024-07-18