feat: 更新ESP32Servo库

This commit is contained in:
王立帮
2025-04-29 21:38:30 +08:00
parent 231fd8463f
commit 29e0873289
19 changed files with 3649 additions and 854 deletions

View File

@@ -0,0 +1,25 @@
/*
*/
#include <ESP32Servo.h>
int pin = 2;
void setup() {
// Allow allocation of all timers
ESP32PWM::allocateTimer(0);
ESP32PWM::allocateTimer(1);
ESP32PWM::allocateTimer(2);
ESP32PWM::allocateTimer(3);
Serial.begin(115200);
}
void loop() {
tone(pin, 4186, // C
500); // half a second
tone(pin, 5274, // E
500); // half a second
delay(500);
}