尹小舟 发表于 2024-4-30 18:26

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

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

<p>1&nbsp; 板子上的串口是虚拟串口</p>

<p>&nbsp;&nbsp;</p>

<p>板子没有串口芯片</p>

<p>2.测试代码</p>

<pre>
<code>#include &lt;Arduino.h&gt;

#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
}</code></pre>

<p>3.测试情况</p>

<p> &nbsp;</p>

<p>COM33 是&nbsp; ESP32 C6 开发板串口</p>

<p>COM23 是&nbsp; CH343&nbsp; &nbsp;CH343 RX 接16脚</p>

<p>3.1&nbsp;&nbsp;COM33</p>

<p> &nbsp;</p>

<p>3.2&nbsp;&nbsp;COM23</p>

<p> &nbsp;</p>

<p>&nbsp;</p>

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

<p>&nbsp;</p>

xhackerustc 发表于 2024-4-30 20:34

感觉你说的是usb虚拟出来的cdc串口,那个串口可以用,能用来打印/输入,在esp-idf中可以配置,见我的测评贴
页: [1]
查看完整版本: FireBeetle 2 ESP32 C6开发板_串口测试_板子上的虚拟串口不能用吗?