ESP32Servo
ToneExample.ino
Go to the documentation of this file.
1 /*
2 
3 
4  */
5 
6 #include <ESP32Servo.h>
7 int pin = 2;
8 void setup() {
9  // Allow allocation of all timers
14  Serial.begin(115200);
15 
16 }
17 
18 void loop() {
19  tone(pin, 4186, // C
20  500); // half a second
21  tone(pin, 5274, // E
22  500); // half a second
23  delay(500);
24 
25 }
void loop()
Definition: ToneExample.ino:18
static void allocateTimer(int timerNumber)
Definition: ESP32PWM.cpp:25
void setup()
Definition: ToneExample.ino:8
int pin
Definition: ToneExample.ino:7
void tone(int APin, unsigned int frequency)
Definition: ESP32Tone.cpp:11