#define ledPin 25
const int freq = 5000;
const int ledChannel = 0;
const int resolution = 8; // 0-255
int ramp = 0;
void setup() {
ledcSetup(ledChannel, freq, resolution);
ledcAttachPin(ledPin, ledChannel);
Serial.begin(115200);
}
void loop() {
ledcWrite(ledChannel, ramp ); // analogWrite()
ramp++;
if(ramp>=256){
ramp = 0;
}
Serial.print("0, 255, ");
Serial.println(ramp);
delay(15);
}