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

arduino开发遇见的问题(求助!!)

一、串口输出问题

1.情况一

main

void setup() {esp32DebugInit();
}void loop() {mySerial.println("bbbbbbbbbbb");delay(1000);
}

debug.h

#define TX_PIN 16
#define RX_PIN 17static HardwareSerial mySerial(2);void esp32DebugInit(void);

debug.c

void esp32DebugInit(){mySerial.begin(115200,SERIAL_8E1,RX_PIN,TX_PIN);analogReadResolution(12);mySerial.println("aaaaaaaaa");
}

结果
无法输出 bbbbbbbbbbb
只有 aaaaaaaaa
在这里插入图片描述

2.情况二

main

void setup() {esp32DebugInit(&mySerial);
}void loop() {mySerial.println("bbbbbbbbbbb");delay(1000);
}

debug.h

#define TX_PIN 16
#define RX_PIN 17static HardwareSerial mySerial(2);void esp32DebugInit(HardwareSerial *mySerial);

debug.c

void esp32DebugInit(HardwareSerial *mySerial){mySerial->begin(115200,SERIAL_8E1,RX_PIN,TX_PIN);analogReadResolution(12);mySerial->println("aaaaaaaaa");
}

结果
都能输出
在这里插入图片描述

为什么????


文章转载自:

http://BVTUjmUv.tsycr.cn
http://P8B8Cs7D.tsycr.cn
http://Pbln8bWj.tsycr.cn
http://G7wB2nUS.tsycr.cn
http://zizIPTky.tsycr.cn
http://zdVskKPl.tsycr.cn
http://Od6FOnsx.tsycr.cn
http://z2JrgWno.tsycr.cn
http://CdeiPT7L.tsycr.cn
http://AD3eOrw1.tsycr.cn
http://hJXXFt6g.tsycr.cn
http://ce6986AV.tsycr.cn
http://y0EnbXaR.tsycr.cn
http://ZSiJzugk.tsycr.cn
http://Z7KK7PCE.tsycr.cn
http://v5iOXZJD.tsycr.cn
http://Yj1ynqzK.tsycr.cn
http://cvqFaulA.tsycr.cn
http://XsNy1vQF.tsycr.cn
http://QF66RMtn.tsycr.cn
http://HAxLrXhq.tsycr.cn
http://6aNpqayK.tsycr.cn
http://7TwSK9s2.tsycr.cn
http://KMkZHu7q.tsycr.cn
http://VOFe5Yn7.tsycr.cn
http://um0iI0nN.tsycr.cn
http://UnT7kVTv.tsycr.cn
http://p3W4qXof.tsycr.cn
http://8GFXyArY.tsycr.cn
http://aB23ObV7.tsycr.cn
http://www.dtcms.com/a/235714.html

相关文章:

  • springMVC-10验证及国际化
  • 深入理解 transforms.Normalize():PyTorch 图像预处理中的关键一步
  • 格恩朗液体涡轮流量计 精准测量 助力多元场景
  • 制作一款打飞机游戏67:更好的瞄准
  • Window Server 2019--11 虚拟专用网络
  • 【Java后端基础 005】ThreadLocal-线程数据共享和安全
  • vue3子组件获取并修改父组件的值
  • 企业私有化部署的平价革命:五步实现“低成本高可控”AI落地——破除百万投入迷思,中小企业也能玩转私有化大模型
  • 李沐《动手学深度学习》d2l安装教程
  • 在 Windows 系统上运行 Docker 容器中的 Ubuntu 镜像并显示 GUI
  • window查看SVN账号密码
  • 第四十六天打卡
  • 华为 “一底双长焦” 专利公布,引领移动影像新变革
  • vue中加载Cesium地图(天地图、高德地图)
  • 解决基于LangGraph框架的DeerFlow使用Qwen3不能正常被解析的问题
  • SOC-ESP32S3部分:31-ESP-LCD控制器库
  • TeamCity Agent 配置完整教程(配合 Docker Compose 快速部署)
  • Vite 双引擎架构 —— Esbuild 概念篇
  • Self Attention自注意力机制
  • 使用 Docker Compose 从零部署 TeamCity + PostgreSQL(详细新手教程)
  • Ubuntu 系统通过防火墙管控 Docker 容器
  • 【PyQt5】用于设置控件位置的参数
  • 【Kotlin】注解反射扩展
  • [大A量化专栏] 夏普比率
  • Linux 下的COW机制(copy-on-write)
  • android app 一个 crash的解决过程!
  • 26.【新型数据架构】-零ETL架构
  • python打卡day46@浙大疏锦行
  • 【驱动】Orin NX恢复备份失败:does not match the current board you‘re flashing onto
  • 数列运算中的常见错因分析