Dlloydev / ESP32-ESP32S2-AnalogWrite

ESP32 PWM, Servo, Easing and Tone. Smart GPIO pin management and advanced control features.
MIT License
100 stars 17 forks source link

'class Pwm' has no member named 'setServo' #23

Closed uPesy closed 1 year ago

uPesy commented 1 year ago

Hi, I'm trying to use the libray to control a servo, but it doesn't work when i'm using the pwm.setServo function. It's not in the keywords.txt file :/ image

Dlloydev commented 1 year ago

Yes, thanks for reporting this. The error reported is correct ... I forgot to delete setServo() from the readme.

The servo's minimum, default and maximum microseconds are now set by using the attach() function. This is now similar to how other libraries work, however you also have a bit more control. The servo pin can auto-attach to the first free channel, or you can specify the specific channel to use. See attach() in the readme file.

Dlloydev commented 1 year ago

Have a new update ready with new tone() function and updated readme document. Closing for now, please start a new issue or discussion if needed. regards, dlloydev

uPesy commented 1 year ago

Yes, thanks for reporting this. The error reported is correct ... I forgot to delete setServo() from the readme.

The servo's minimum, default and maximum microseconds are now set by using the attach() function. This is now similar to how other libraries work, however you also have a bit more control. The servo pin can auto-attach to the first free channel, or you can specify the specific channel to use. See attach() in the readme file.

Ok i understand better why it's doesn't work -> the doc was not up to date