当前位置: 首页 > 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.

参考连接

http://www.dtcms.com/a/231231.html

相关文章:

  • 行为型-模板模式
  • 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界面
  • 机器学习的数学基础:线性模型
  • unix/linux,sudo,其高级使用
  • 在 Android 框架中,接口的可见性规则
  • Excel 透视表以及透视图应用(基础版)
  • 实验设计如何拯救我的 CEI VSR 28G 设计
  • Springboot——整合websocket并根据type区别处理
  • Git忽略规则.gitignore不生效解决
  • Dockerfile基础
  • 【Docker 从入门到实战全攻略(二):核心概念 + 命令详解 + 部署案例】
  • 【计算机网络】HTTPS