// Forum: https://forum.arduino.cc/t/updating-frequency-at-pwm-pin/1247368
// This Wokwi project: https://wokwi.com/projects/395088728070574081
const int pwmChannel = 1;
const int pwmPin = 26;
void setup()
{
pinMode(pwmPin, OUTPUT);
// Is the frequency used ?
// Can the frequency be anything ?
ledcSetup(pwmChannel, 32, 8);
ledcAttachPin(pwmPin, pwmChannel);
}
void loop()
{
ledcWriteTone(pwmChannel, 5);
delay(1000);
}