#include <Arduino.h>
#define led 26
#define feq 2000
#define resolution 8
#define channel 0
void setup() {
//ledcSetup(channel,feq,resolution);
ledcAttach(led,feq,resolution);
}
void loop() {
for(int i = 0;i<pow(2,resolution);i++){
ledcWrite(channel,i);
delay(10);
}
for(int i = pow(2,resolution)-1;i>0;i--){
ledcWrite(channel,i);
delay(10);
}
}