Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Support for ESP32-S2 & ESP-S3, configurable frequency and radians #23

Merged
merged 7 commits into from
Aug 29, 2023

Conversation

mikaeltulldahl
Copy link
Contributor

This is fork from @h2zero incorporating a fix for ESP32-S2 which turned out to also fix the same problem for ESP32-S3, where the resolution was configured to too high in ledcSetup.

The changes are only tested on an ESP32-S3-DevKitC-1.
This should solve issue #18.

Added this functionality:

  • Configurable frequency
    • Defaults to 50 hz
    • Also tested at 333hz which is common for modern servos.
  • Users can now instantiate ServoFloat and ServoDouble in addition to Servo.
    • This is to allow using radians, which would get truncated with integers. Also when using degrees this is beneficial if you want better resolution than 1 degree.
    • The implementation must be in the header file for template classes.
    • ServoBase class is shared between all template versions of ServoTemplate, so the static variable channel_next_free is shared.
    • Added an example for how to use ServoFloat with radians.

h2zero and others added 7 commits October 21, 2022 22:15
Users can now instantiate ServoFloat and ServoDouble in addition to Servo.
This is to allow using radians, which would get truncated with integers.
Also when using degrees this is beneficial if you want better resolution than 1 degree.
The implementation must be in the header file for template classes.
ServoBase class is shared between all template versions of ServoTemplate, so the static variable channel_next_free is shared.
Added an example for how to use ServoFloat with radians.
@mikaeltulldahl
Copy link
Contributor Author

Hello @JarekParal is it possible to get this merged?

@JarekParal JarekParal merged commit 9821580 into RoboticsBrno:master Aug 29, 2023
@JarekParal
Copy link
Member

@mikaeltulldahl Hello, thank you very much for your PR. All the changes seems to be good. I merged it and I'm going to release it as version 1.1

@mikaeltulldahl mikaeltulldahl deleted the s3 branch August 29, 2023 23:44
@mikaeltulldahl
Copy link
Contributor Author

Great! If possible, could you also publish the update on PlatformIO with pio pkg publish?

@JarekParal
Copy link
Member

JarekParal commented Aug 30, 2023

Do you know if the automatic update of PlatformIO libraries still works or it has to be done only with pio pkq publish?

@mikaeltulldahl
Copy link
Contributor Author

mikaeltulldahl commented Aug 30, 2023 via email

@JarekParal
Copy link
Member

JarekParal commented Aug 30, 2023

The automatic update from GitHub Release is still working on PIO:
image

@mikaeltulldahl
Copy link
Contributor Author

Ah yes, my mistake

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants