Arduino下 ESP32蓝牙与PC蓝牙数据传输

该文章介绍了如何通过ArduinoIDE在ESP32上配置蓝牙串行通信,创建一个Serial到SerialBT的桥接,使得ESP32能与PC通过蓝牙进行数据传输。用户需在Arduino中加载示例代码并烧录,然后在PC端通过蓝牙连接ESP32(设备名ESP32test),选择相应的COM端口进行通信。测试结果显示,发送的数据能在两端正确接收。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Arduino下 ESP32蓝牙与PC蓝牙数据传输

ESP32

打开Arduino,选择“文件”—“示例”—“BluetoothSerial”—“SerialToSerialBT”:
在这里插入图片描述
然后选择开发板和端口,编译烧录,在下方发送框内输入要发送的信息
在这里插入图片描述

//This example code is in the Public Domain (or CC0 licensed, at your option.)
//By Evandro Copercini - 2018
//
//This example creates a bridge between Serial and Classical Bluetooth (SPP)
//and also demonstrate that SerialBT have the same functionalities of a normal Serial

#include "BluetoothSerial.h"

#if !
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值