diff --git a/README.md b/README.md index 741b459..4539b6c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - +![](attachments/20250202192226.png) ### 前言: 本教程旨在记录并分享个人学习ESP32过程中的经验和心得,以帮助其他初学者快速上手ESP32开发。这是一份从初学者视角出发,整理了学习ESP32的一条较为合理的路径和方法的笔记汇编。 @@ -471,6 +471,7 @@ - BLE连接与数据传输 ## 7.3 经典蓝牙开发 + - SPP协议基础 - 经典蓝牙数据传输 @@ -481,14 +482,17 @@ > 目标:学习LVGL图形库的基础知识,掌握图形界面开发的核心方法,设计简单的GUI界面。 ## 8.1 LVGL基础 + - LVGL环境搭建 - LVGL的基本架构 ## 8.2 常用组件与布局 + - 常用控件的使用(按钮、标签等) - 布局系统与屏幕适配 ## 8.3 图形界面项目开发 + - 动态界面更新 - 图形界面优化技巧 @@ -505,6 +509,7 @@ - 图形界面集成 ## 9.2 开发经验总结 + - 常见问题与解决方法 - 代码优化与性能调试 diff --git a/attachments/20250202192226.png b/attachments/20250202192226.png new file mode 100644 index 0000000..4a5bc2c Binary files /dev/null and b/attachments/20250202192226.png differ diff --git a/docs/06.Wi-Fi功能与相关协议/6.2-网络协议应用/6.2.3-HTTP协议/HTTP协议(服务端)/HTTP协议(服务端).md b/docs/06.Wi-Fi功能与相关协议/6.2-网络协议应用/6.2.3-HTTP协议/HTTP协议(服务端)/HTTP协议(服务端).md index fa0f97a..9943bd8 100644 --- a/docs/06.Wi-Fi功能与相关协议/6.2-网络协议应用/6.2.3-HTTP协议/HTTP协议(服务端)/HTTP协议(服务端).md +++ b/docs/06.Wi-Fi功能与相关协议/6.2-网络协议应用/6.2.3-HTTP协议/HTTP协议(服务端)/HTTP协议(服务端).md @@ -197,15 +197,15 @@ static esp_err_t hello_get_handler(httpd_req_t *req) >代码很多,但实际并不复杂运行效果如下: -![](attachments/Pasted%20image%2020240325174743.png) +![](attachments/20240325174743.png) -![](attachments/Pasted%20image%2020240325174900.png) +![](attachments/20240325174900.png) get参数解析: -![](attachments/Pasted%20image%2020240325175024.png) +![](attachments/20240325175024.png) -![](attachments/Pasted%20image%2020240325175043.png) +![](attachments/20240325175043.png) 我们还可以使用get返回一个网页,用于数据交互: @@ -266,12 +266,12 @@ static esp_err_t html_get_handler(httpd_req_t *req) 访问效果如图所示: -![](attachments/Pasted%20image%2020240326085636.png) +![](attachments/20240326085636.png) #### POST方法 我们接着刚才写好的表单,发起一个psot请求 -![](attachments/Pasted%20image%2020240326090740.png) +![](attachments/20240326090740.png) 这里的URL的IP需要填写自己ESP32联网分配到的IP。这样我们点击提交表单就可以直接发起POST请求。 @@ -335,18 +335,18 @@ static esp_err_t echo_post_handler(httpd_req_t *req) 在表单填写内容: -![](attachments/Pasted%20image%2020240326091157.png) +![](attachments/20240326091157.png) 提交: -![](attachments/Pasted%20image%2020240326091216.png) +![](attachments/20240326091216.png) 数据回显,POST请求验证完成。 >PS:如果出现下面的报错:Header fields are too long ->![](attachments/Pasted%20image%2020240326091539.png) +>![](attachments/20240326091539.png) >需要在配置文件里修改: ->![](attachments/Pasted%20image%2020240326091652.png) +>![](attachments/20240326091652.png) #### PUT方法 @@ -422,18 +422,18 @@ xhr.open("PUT","http://192.168.137.55/ctrl",true); xhr.send("0"); ``` -![](attachments/Pasted%20image%2020240326094235.png) +![](attachments/20240326094235.png) -![](attachments/Pasted%20image%2020240326094304.png) +![](attachments/20240326094304.png) 这时hello路由就被取消注册了: -![](attachments/Pasted%20image%2020240326094552.png) +![](attachments/20240326094552.png) 发送1,hello被重新注册: -![](attachments/Pasted%20image%2020240326094621.png) +![](attachments/20240326094621.png) ### 三、停止服务器,释放资源