FireBeetle 2 ESP32 C6开发板_串口测试_板子上的虚拟串口不能用吗?
[复制链接]
本帖最后由 尹小舟 于 2024-4-30 18:27 编辑
1 板子上的串口是虚拟串口
板子没有串口芯片
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.测试情况
COM33 是 ESP32 C6 开发板串口
COM23 是 CH343 CH343 RX 接16脚
3.1 COM33
3.2 COM23
虚拟串口没有效果,这个板子上的虚拟串口,可以用在打印输出吗 如何使用
|