I use wokwi website and i run my coding, but the error was appear as :
/libraries/ESP32Servo/src/ESP32PWM.cpp: In destructor 'virtual ESP32PWM::~ESP32PWM()':
/libraries/ESP32Servo/src/ESP32PWM.cpp:53:3: error: 'ledcDetach' was not declared in this scope
ledcDetach(pin);
^~~~~~
/libraries/ESP32Servo/src/ESP32PWM.cpp:53:3: note: suggested alternative: 'ledcDetachPin'
ledcDetach(pin);
^~~~~~
ledcDetachPin
/libraries/ESP32Servo/src/ESP32PWM.cpp: In static member function 'static double ESP32PWM::_ledcSetupTimerFreq(uint8_t, double, uint8_t)':
/libraries/ESP32Servo/src/ESP32PWM.cpp:60:9: error: 'ledcAttach' was not declared in this scope
return ledcAttach(pin, freq, bit_num);
^~~~~~
/libraries/ESP32Servo/src/ESP32PWM.cpp:60:9: note: suggested alternative: 'ledcAttachPin'
return ledcAttach(pin, freq, bit_num);
^~~~~~
ledcAttachPin
/libraries/ESP32Servo/src/ESP32PWM.cpp: In member function 'double ESP32PWM::setup(double, uint8_t)':
/libraries/ESP32Servo/src/ESP32PWM.cpp:150:3: error: 'ledcDetach' was not declared in this scope
ledcDetach(pin);
^~~~~~
/libraries/ESP32Servo/src/ESP32PWM.cpp:150:3: note: suggested alternative: 'ledcDetachPin'
ledcDetach(pin);
^~~~~~
ledcDetachPin
/libraries/ESP32Servo/src/ESP32PWM.cpp:151:16: error: 'ledcAttach' was not declared in this scope
double val = ledcAttach(getPin(), freq, resolution_bits);
^~~~~~
/libraries/ESP32Servo/src/ESP32PWM.cpp:151:16: note: suggested alternative: 'ledcAttachPin'
double val = ledcAttach(getPin(), freq, resolution_bits);
^~~~~~
ledcAttachPin
/libraries/ESP32Servo/src/ESP32PWM.cpp:155:9: error: 'ledcAttach' was not declared in this scope
return ledcAttach(getPin(), freq, resolution_bits);
^~~~~~
/libraries/ESP32Servo/src/ESP32PWM.cpp:155:9: note: suggested alternative: 'ledcAttachPin'
return ledcAttach(getPin(), freq, resolution_bits);
^~~~~~
ledcAttachPin
/libraries/ESP32Servo/src/ESP32PWM.cpp: In member function 'void ESP32PWM::adjustFrequencyLocal(double, double)':
/libraries/ESP32Servo/src/ESP32PWM.cpp:172:3: error: 'ledcDetach' was not declared in this scope
ledcDetach(pin);
^~~~~~
/libraries/ESP32Servo/src/ESP32PWM.cpp:172:3: note: suggested alternative: 'ledcDetachPin'
ledcDetach(pin);
^~~~~~
ledcDetachPin
/libraries/ESP32Servo/src/ESP32PWM.cpp:176:3: error: 'ledcAttach' was not declared in this scope
ledcAttach(getPin(), freq, resolutionBits); // re-attach the pin after frequency adjust
^~~~~~
/libraries/ESP32Servo/src/ESP32PWM.cpp:176:3: note: suggested alternative: 'ledcAttachPin'
ledcAttach(getPin(), freq, resolutionBits); // re-attach the pin after frequency adjust
^~~~~~
ledcAttachPin
/libraries/ESP32Servo/src/ESP32PWM.cpp: In member function 'void ESP32PWM::attachPin(uint8_t)':
/libraries/ESP32Servo/src/ESP32PWM.cpp:237:3: error: 'ledcAttach' was not declared in this scope
ledcAttach(pin, readFreq(), resolutionBits);
^~~~~~
/libraries/ESP32Servo/src/ESP32PWM.cpp:237:3: note: suggested alternative: 'ledcAttachPin'
ledcAttach(pin, readFreq(), resolutionBits);
^~~~~~
ledcAttachPin
/libraries/ESP32Servo/src/ESP32PWM.cpp: In member function 'void ESP32PWM::detachPin(int)':
/libraries/ESP32Servo/src/ESP32PWM.cpp:264:2: error: 'ledcDetach' was not declared in this scope
ledcDetach(pin);
^~~~~~
/libraries/ESP32Servo/src/ESP32PWM.cpp:264:2: note: suggested alternative: 'ledcDetachPin'
ledcDetach(pin);
^~~~~~
ledcDetachPin
I use wokwi website and i run my coding, but the error was appear as : /libraries/ESP32Servo/src/ESP32PWM.cpp: In destructor 'virtual ESP32PWM::~ESP32PWM()': /libraries/ESP32Servo/src/ESP32PWM.cpp:53:3: error: 'ledcDetach' was not declared in this scope ledcDetach(pin); ^
~~~~~ /libraries/ESP32Servo/src/ESP32PWM.cpp:53:3: note: suggested alternative: 'ledcDetachPin' ledcDetach(pin); ^~~~~~ ledcDetachPin /libraries/ESP32Servo/src/ESP32PWM.cpp: In static member function 'static double ESP32PWM::_ledcSetupTimerFreq(uint8_t, double, uint8_t)': /libraries/ESP32Servo/src/ESP32PWM.cpp:60:9: error: 'ledcAttach' was not declared in this scope return ledcAttach(pin, freq, bit_num); ^~~~~~ /libraries/ESP32Servo/src/ESP32PWM.cpp:60:9: note: suggested alternative: 'ledcAttachPin' return ledcAttach(pin, freq, bit_num); ^~~~~~ ledcAttachPin /libraries/ESP32Servo/src/ESP32PWM.cpp: In member function 'double ESP32PWM::setup(double, uint8_t)': /libraries/ESP32Servo/src/ESP32PWM.cpp:150:3: error: 'ledcDetach' was not declared in this scope ledcDetach(pin); ^~~~~~ /libraries/ESP32Servo/src/ESP32PWM.cpp:150:3: note: suggested alternative: 'ledcDetachPin' ledcDetach(pin); ^~~~~~ ledcDetachPin /libraries/ESP32Servo/src/ESP32PWM.cpp:151:16: error: 'ledcAttach' was not declared in this scope double val = ledcAttach(getPin(), freq, resolution_bits); ^~~~~~ /libraries/ESP32Servo/src/ESP32PWM.cpp:151:16: note: suggested alternative: 'ledcAttachPin' double val = ledcAttach(getPin(), freq, resolution_bits); ^~~~~~ ledcAttachPin /libraries/ESP32Servo/src/ESP32PWM.cpp:155:9: error: 'ledcAttach' was not declared in this scope return ledcAttach(getPin(), freq, resolution_bits); ^~~~~~ /libraries/ESP32Servo/src/ESP32PWM.cpp:155:9: note: suggested alternative: 'ledcAttachPin' return ledcAttach(getPin(), freq, resolution_bits); ^~~~~~ ledcAttachPin /libraries/ESP32Servo/src/ESP32PWM.cpp: In member function 'void ESP32PWM::adjustFrequencyLocal(double, double)': /libraries/ESP32Servo/src/ESP32PWM.cpp:172:3: error: 'ledcDetach' was not declared in this scope ledcDetach(pin); ^~~~~~ /libraries/ESP32Servo/src/ESP32PWM.cpp:172:3: note: suggested alternative: 'ledcDetachPin' ledcDetach(pin); ^~~~~~ ledcDetachPin /libraries/ESP32Servo/src/ESP32PWM.cpp:176:3: error: 'ledcAttach' was not declared in this scope ledcAttach(getPin(), freq, resolutionBits); // re-attach the pin after frequency adjust ^~~~~~ /libraries/ESP32Servo/src/ESP32PWM.cpp:176:3: note: suggested alternative: 'ledcAttachPin' ledcAttach(getPin(), freq, resolutionBits); // re-attach the pin after frequency adjust ^~~~~~ ledcAttachPin /libraries/ESP32Servo/src/ESP32PWM.cpp: In member function 'void ESP32PWM::attachPin(uint8_t)': /libraries/ESP32Servo/src/ESP32PWM.cpp:237:3: error: 'ledcAttach' was not declared in this scope ledcAttach(pin, readFreq(), resolutionBits); ^~~~~~ /libraries/ESP32Servo/src/ESP32PWM.cpp:237:3: note: suggested alternative: 'ledcAttachPin' ledcAttach(pin, readFreq(), resolutionBits); ^~~~~~ ledcAttachPin /libraries/ESP32Servo/src/ESP32PWM.cpp: In member function 'void ESP32PWM::detachPin(int)': /libraries/ESP32Servo/src/ESP32PWM.cpp:264:2: error: 'ledcDetach' was not declared in this scope ledcDetach(pin); ^~~~~~ /libraries/ESP32Servo/src/ESP32PWM.cpp:264:2: note: suggested alternative: 'ledcDetachPin' ledcDetach(pin); ^~~~~~ ledcDetachPinError during build: exit status 1