/*write a program to control the brightness of an led connected to GPIO2 of esp32
*/
void setup() {
 pinMode(2,OUTPUT);
}

void loop() {
  for(int i=0;i<255;i++){
    analogWrite(2,i);
    delay(10);
  }
  for(int j=255;j>0;j--){
    analogWrite(2,j);
    delay(10);
  }
}