chore: README

This commit is contained in:
玖叁 2024-12-18 14:12:46 +08:00
parent 64a4c8ae43
commit ba429faebe
4 changed files with 42 additions and 2 deletions

28
README.md Normal file
View File

@ -0,0 +1,28 @@
# ESP32 TB6612 麦轮车
## 特性
- ESP32 主控
- 四路 TB6612 电机驱动
- 麦轮车
- BLE 串口通信
- 循迹功能
- 手动控制
## 原理图
![原理图](./docs/原理图.png)
## 使用
### VSCode 安装 PlatformIO
### 下载项目
```bash
git clone https://github.com/colour93/esp32-car.git
```
## BLE 串口通信协议
[数据包格式](./packet.md)

BIN
docs/原理图.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

View File

@ -62,3 +62,13 @@
包体 `00 06 21 方向 时间 FF`
控制示例 `00 06 21 01 01 FF`
## 设置
### 设置转向灵敏度 `0x30`
含义为 1 度对应差速
包体 `00 05 30 差速 FF`
设置示例 `00 05 30 10 FF`

View File

@ -6,6 +6,8 @@
#define STATUS_LED 2
#define DEVICE_NAME "WhiteTiger"
#define HC_SR04_TRIG 23
#define HC_SR04_ECHO 22
@ -165,7 +167,7 @@ void setup()
Serial.begin(115200);
// 初始化 BLE
BLEDevice::init("WhiteTiger");
BLEDevice::init(DEVICE_NAME);
pServer = BLEDevice::createServer();
pServer->setCallbacks(new CarBLEServerCallbacks());