const int LED_rt = 16;
int PWM;
void setup() {
// put your setup code here, to run once:
pinMode(LED_rt, OUTPUT);
Serial.begin(115200);
Serial.println("Hello, ESP32!");
ledcBegin(LED_rt, 100, 12);
PWM = 0;
}
void loop() {
// put your main code here, to run repeatedly:
delay(100); // this speeds up the simulation
ledcWrite(LED_rt, PWM);
PWM += 50;
if(PWM > 4095) {
PWM = 0;
Serial.println("Überlauf, nächster Zyklus");
}
}