FireBeetle 2 ESP32 C6开发板_串口测试_板子上的虚拟串口不能用吗?

尹小舟   2024-4-30 18:26 楼主

1  板子上的串口是虚拟串口

image.png   

板子没有串口芯片

2.测试代码

#include <Arduino.h>

#define LED_BLUE    SCK
#define LED_RED     MOSI
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BLUE, OUTPUT);
  pinMode(LED_RED, OUTPUT);
  Serial.begin(9600); //set up serial library baud rate to 9600
 // Serial1.begin(9600, SERIAL_8N1, /*rx =*/D3, /*tx =*/D2);
}

void loop() {
  // put your main code here, to run repeatedly:
  Serial.printf("11111222");
  log_e("Serial number is invalid, please use a number from 0 to /r/n", );
  digitalWrite(LED_BLUE, HIGH);  // turn the LED on (HIGH is the voltage level)
  delay(200);                      // wait for a second
  digitalWrite(LED_BLUE, LOW);   // turn the LED off by making the voltage LOW
  delay(200);                      // wait for a second
  digitalWrite(LED_RED, HIGH);  // turn the LED on (HIGH is the voltage level)
  delay(200);                      // wait for a second
  digitalWrite(LED_RED, LOW);   // turn the LED off by making the voltage LOW
  delay(200);                      // wait for a second
}

3.测试情况

image.png  

COM33 是  ESP32 C6 开发板串口

COM23 是  CH343   CH343 RX 接16脚

3.1  COM33

image.png  

3.2  COM23

image.png  

 

虚拟串口没有效果,这个板子上的虚拟串口,可以用在打印输出吗 如何使用

 

本帖最后由 尹小舟 于 2024-4-30 18:27 编辑

回复评论 (1)

感觉你说的是usb虚拟出来的cdc串口,那个串口可以用,能用来打印/输入,在esp-idf中可以配置,见我的测评贴
点赞  2024-4-30 20:34
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复