修改波特率为9600

This commit is contained in:
2025-08-25 16:58:09 +08:00
parent 4c079e68fa
commit 4260918f36

View File

@ -40,11 +40,11 @@ void printDeviceStatus() {
void setup() {
// 调试串口
DebugSerial.begin(115200, SERIAL_8N1, DEBUG_RX_PIN, DEBUG_TX_PIN);
DebugSerial.begin(9600, SERIAL_8N1, DEBUG_RX_PIN, DEBUG_TX_PIN);
DebugSerial.setTimeout(1);
// 电机数据通信串口
Serial.begin(115200);
Serial.begin(9600);
Serial.setTimeout(100);
DebugSerial.println("VSMD INIT");
@ -84,7 +84,7 @@ void handleSerialData() {
char jsonString[JSON_BUFFER_SIZE];
memcpy(jsonString, responseBuffer, unpackResult);
jsonString[unpackResult] = '\0';
//printSerialRawData(responseBuffer, unpackResult);
processJsonCommand(jsonString);
//BLE Notify
sendBluetoothData(sendBuffer, packedLength);