#define led 0
#define pm 35
int pwm_fre=5000;
int pwm_res=12;
int dcy=0;
#define pwm_channel 0
void setup(){
Serial.begin(115200);
delay(1000);
ledcSetup(pwm_channel,pwm_fre,pwm_res);
ledcAttachPin(led,pwm_channel);
ledcWrite(led,dcy);
}
void loop(){
analogRead(pm);
ledcWrite(led,pm);
}