i have esp32 and i used this code, but since last update of board this code dont compile anymore
void setup() {
analogReadResolution(6); // Set analog read resolution: 6biots(0-63), 8 bits(0-255), 10 bits (0-1023)
ledcSetup(0, 50, 6); // Configure PWM channel 0, 5000 Hz frequency, 6-bit resolution
ledcAttachPin(26, 0); // Attach the PWM channel to GPIO26
ledcWrite(0, 25);
}
I'm getting the following errors:
C:\Users\q\Documents\Arduino\test\test.ino: In function 'void setup()':
C:\Users\q\Documents\Arduino\test\test.ino:136:3: error: 'ledcSetup' was not declared in this scope; did you mean 'ledc_stop'?
136 | ledcSetup(0, 50, 6); // Configure PWM channel 0, 5000 Hz frequency, 6-bit resolution
| ^~~~~~~~~
| ledc_stop
C:\Users\q\Documents\Arduino\test\test.ino:137:3: error: 'ledcAttachPin' was not declared in this scope; did you mean 'ledcAttach'?
137 | ledcAttachPin(M6_GPIO_throttle_OUT, 0); // Attach the PWM channel to GPIO26
| ^~~~~~~~~~~~~
| ledcAttach
exit status 1
Compilation error: 'ledcSetup' was not declared in this scope; did you mean 'ledc_stop'?