当前位置: 首页 > news >正文

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.

参考连接

相关文章:

  • 行为型-模板模式
  • LINUX64 FTP 1; rsync inotify.sh脚本说明
  • 【统计方法】蒙特卡洛
  • 分析Web3下数据保护的创新模式
  • 05.字母异位词分组
  • 量子通信:从科幻走向现实的未来通信技术
  • 线性模型选择中容易被忽视的关键洞察
  • Java八股文——Redis篇
  • 前端组件推荐 Swiper 轮播与 Lightbox 灯箱组件深度解析
  • grafana 批量视图备份及恢复(含数据源)
  • Spring Boot微服务架构(十一):独立部署是否抛弃了架构优势?
  • Windows下运行Redis并设置为开机自启的服务
  • 智慧城市建设方案
  • 小白的进阶之路系列之十四----人工智能从初步到精通pytorch综合运用的讲解第七部分
  • yaffs2目录搜索上下文数据结构struct yaffsfs_dirsearchcontext yaffsfs_dsc[] 详细解析
  • 10.MySQL索引特性
  • cv::FileStorage用法
  • Qt Creator工具编译器配置
  • Linux防火墙实战演练
  • 基于 PyTorch 的 VGG16 深度学习人脸识别检测系统的实现+ui界面
  • 宣传片拍摄方案策划书/商丘网站seo
  • 厦门建站价格/广告推广策划
  • 重庆药师网/seo网站关键词优化软件
  • 徐州企业网站建设公司/搜狗网站收录提交入口
  • wordpress多文件传递变量/搜索引擎优化方法案例
  • 国外疫情最新消息排行表/seo基础课程