first commit
This commit is contained in:
commit
e6a42e28e9
4355 changed files with 4626605 additions and 0 deletions
25
libraries/ESP32Servo/examples/ToneExample/ToneExample.ino
Normal file
25
libraries/ESP32Servo/examples/ToneExample/ToneExample.ino
Normal 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);
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue