When using the regular Tone() and NoTone() on the espressif32 platform it generates an error saying these functions are not defined while the same code works fine on the espressif8266 platform.
In an earlier topic he same issue was reported for te Attiny85 and solved by an update of that platform. Could the same be true for this issue?
// the number of the LED pin
const int ledPin = 16; // 16 corresponds to GPIO16
// setting PWM properties
const int freq = 5000;
const int ledChannel = 0;
const int resolution = 8;
void setup(){
// configure LED PWM functionalitites
ledcSetup(ledChannel, freq, resolution);
// attach the channel to the GPIO to be controlled
ledcAttachPin(ledPin, ledChannel);
//output a Middle C
ledcWriteTone(ledChannel, 261.626);
}
void loop(){
//wait 5 secs
delay(5000);
//disable tone
ledcWriteTone(ledChannel, 0);
}