ARTICLE DETAIL

资讯详情

深耕郑州网站建设与运营推广的一线实战洞察。

VSCode+PlatfoemIO+ESP32-Cam + MB烧录器 入门测试

VSCode+PlatfoemIO+ESP32-Cam + MB烧录器 入门测试

研究大半天的监控无法打印日志的问题,两个问题

1、避免 println,改用printf在某些 MB 板上,println会被 CDC 缓冲吞掉,导致监控无法输出(很玄学,但真实存在)。

2、彻底禁用一切“下载相关行为”:有些 MB 板在运行期仍然被 DTR/RTS 干扰。在platformio.ini里加:

monitor_rts = 0
monitor_dtr = 0

然后就ok了

main代码

#include <Arduino.h>

void setup() {

Serial.begin(115200);

delay(500);

Serial.printf("BOOT OK\r\n");

}

void loop() {

delay(1000);

Serial.printf("BOOT OK\r\n");

}

ini配置

[env:esp32cam]

platform = espressif32

board = esp32cam

framework = arduino

monitor_speed = 115200

monitor_rts = 0 重要参数

monitor_dtr = 0 重要参数

返回列表