void setup() {
// put your setup code here, to run once:
ledcSetup(0, 2000, 8);
ledcSetup(1, 2000, 8);
ledcAttachPin(2, 0);
ledcAttachPin(4, 1);
Serial.begin(115200);
Serial.println("Hello, ESP32!");
ledcWrite(0, 10);
}
void loop() {
// put your main code here, to run repeatedly:
/*
for(int i = 0; i<256; i++)
{
ledcWrite(0, i);
Serial.print("LED pin 2: ");
Serial.println(i);
delay(20);
}
ledcWrite(0, 0);
*/
delay(1000);
for (int j = 0; j < 256; j++)
{
ledcWrite(1, j);
Serial.print("LED pin 4: ");
Serial.println(j);
delay(20);
}
ledcWrite(1, 0);
delay(1000);
}