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

default resolution is different from normal Arduinos #4

Closed
joshua-8 opened this issue May 2, 2021 · 2 comments
Closed

default resolution is different from normal Arduinos #4

joshua-8 opened this issue May 2, 2021 · 2 comments

Comments

@joshua-8
Copy link

joshua-8 commented May 2, 2021

First of all, thank you so much for fixing the issue with ledcSetup getting called repeatedly! That issue is gone for me now, but I found another thing:
When trying to use this library as a direct replacement for the standard analogWrite function, I noticed that the output was never going above a few percent on.
Usually analogWrite has an 8 bit resolution, but this library seems to use 13 bits as default. It's really great that you provide the option to set higher resolutions since ESP32s can support that, but if it wouldn't be too difficult and if I'm not missing something, changing the default to 8 to be the same as the normal analogWrite would make this library even easier to use.
Thanks,
joshua-8

@Dlloydev
Copy link
Owner

Dlloydev commented May 2, 2021

That's something I was considering but overlooked. Now the PWM defaults match the Arduino UNO.
Thanks

New version 2.0.6

  • the default PWM settings are now 980 Hz with 8-bit resolution (same as Arduino UNO)
  • added setPinsStatusDefaults() function to allow custom default settings
  • updated documentation

@joshua-8
Copy link
Author

joshua-8 commented May 2, 2021

Thank you so much for fixing it, everything looks good to me now!

@Dlloydev Dlloydev closed this as completed May 2, 2021
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

No branches or pull requests

2 participants