格式修正
This commit is contained in:
parent
e9d088ab28
commit
792ec0bcb3
|
@ -4,7 +4,7 @@
|
||||||
Servo servo[8];
|
Servo servo[8];
|
||||||
ESP32PWM pwm;
|
ESP32PWM pwm;
|
||||||
|
|
||||||
int servoPin[8] = {13,12,14,26,25,33,32,15};
|
int servoPin[8] = {13, 12, 14, 26, 25, 33, 32, 15};
|
||||||
|
|
||||||
int minUs = 500;
|
int minUs = 500;
|
||||||
int maxUs = 2500;
|
int maxUs = 2500;
|
||||||
|
@ -24,18 +24,18 @@ void servo_loop() {
|
||||||
}
|
}
|
||||||
pwm.attachPin(27, 10000);
|
pwm.attachPin(27, 10000);
|
||||||
|
|
||||||
// for (int j = 0; j < 8; j++) {
|
// for (int j = 0; j < 8; j++) {
|
||||||
// for (pos = 0; pos <= 180; pos += 1) {
|
// for (pos = 0; pos <= 180; pos += 1) {
|
||||||
// servo[j].write(pos);
|
// servo[j].write(pos);
|
||||||
// Serial.println(pos);
|
// Serial.println(pos);
|
||||||
// delay(5);
|
// delay(5);
|
||||||
// }
|
// }
|
||||||
// for (pos = 0; pos <= 180; pos += 1) {
|
// for (pos = 0; pos <= 180; pos += 1) {
|
||||||
// servo[j].write(180 - pos);
|
// servo[j].write(180 - pos);
|
||||||
// Serial.println(180 - pos);
|
// Serial.println(180 - pos);
|
||||||
// delay(5);
|
// delay(5);
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
for (int i = 0; i < 8; i++) {
|
for (int i = 0; i < 8; i++) {
|
||||||
servo[i].detach();
|
servo[i].detach();
|
||||||
|
|
Loading…
Reference in New Issue