const int ledPin = 14; // Pin donde conectas el LED
// const int pwmChannel = 0; // Canal PWM
const int frequency = 500; // Frecuencia PWM en Hz
const int resolution = 12; // Resolución de 8 bits --> valores de 0 a 255
void setup() {
// Configure PWM channel
ledcAttach(ledPin, frequency, resolution);
// ledcSetup(pwmChannel, frequency, resolution);
// ledcAttachPin(ledPin, pwmChannel);
}
void loop() {
ledcWrite(ledPin, 2048);
}