继续优化平衡控制,多次连续跳跃,毫无压力。

增加原地起立功能。
简化控制,通过 esp32 遥控器直接控制,无需配网。
遥控器地址:#小程序://闲鱼/4I7SlDlYRnybNWd
This commit is contained in:
myperworld committed 2025-08-11 19:38:13 +08:00
1 parent 21770c9531
commit 78bad24dc0
694 files changed
+2022 -54

No files matched your search

@@ -0,0 +1,40 @@
/*
Ping() to test a servo on the bus is ready.
*/
// the uart used to control servos.
// GPIO 18 - S_RXD, GPIO 19 - S_TXD, as default.
#define S_RXD 18
#define S_TXD 19
#include <SCServo.h>
SCSCL sc;
int TEST_ID = 3;
int LEDpin = 13;
void setup()
{
pinMode(LEDpin,OUTPUT);
digitalWrite(LEDpin, HIGH);
Serial.begin(115200);
Serial1.begin(1000000, SERIAL_8N1, S_RXD, S_TXD);
sc.pSerial = &Serial1;
delay(1000);
}
void loop()
{
int ID = sc.Ping(TEST_ID);
if(ID!=-1){
digitalWrite(LEDpin, LOW);
Serial.print("Servo ID:");
Serial.println(ID, DEC);
delay(100);
}else{
Serial.println("Ping servo ID error!");
digitalWrite(LEDpin, HIGH);
delay(2000);
}
}