#define LED1 17
#define LED2 18
#define LED3 19
int val;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
ledcSetup(0, 1000, 8);
ledcAttachPin(LED1, 0);
ledcAttachPin(LED2, 0);
ledcAttachPin(LED3, 0);
}
void loop() {
// put your main code here, to run repeatedly:
for(val=0; val<255; val++) {
ledcWrite(0, val);
Serial.println(val);
delay(10);
}
for(val=255; val>0; val--) {
ledcWrite(0, val);
Serial.println(val);
delay(10);
}
// this speeds up the simulation
}