RP2040 arduino使用内置USB串口 发送数据串口助手接收不到数据原因
不改ARDUINO代码的话需要串口助手需要勾选DTR。
修改arduino代码
Serial.begin(115200);Serial.ignoreFlowControl();//增加一段这个代码
RP2040 Specific SerialUSB methods
void Serial.ignoreFlowControl(bool ignore)
In some cases, the target application will not assert the DTR virtual line, thus preventing writing operations to succeed.
For this reason, the SerialUSB::ignoreFlowControl() method disables the connection’s state verification, enabling the program to write on the port, even though the data might be lost.
bool Serial.dtr()
Returns the current state of the DTR virtual line. A USB CDC host (such as the Arduino serial monitor) typically raises the DTR pin when opening the device, and may lower it when closing the device.
bool Serial.rts()
Returns the current state of the RTS virtual line.
参考连接