-
Notifications
You must be signed in to change notification settings - Fork 19
Change the PWM frequency #2
Comments
Hi again, I forgot to mention that if I instantiate new objects each time it works:
But this is not optimal I guess. EDIT: As I expected this will end up crashing as you are instantiating new objects without deleting the previous ones. Kind regards, |
Hi @americodias Thanks for reporting an interesting bug due to my fault. I'm releasing by today the new release v1.0.2 to fix the issue. I'd really appreciate your contribution. Happy bug finding. Best Regards, KH |
Hi @americodias The new RP2040_PW releases v1.0.2 has just been published Your contribution again has been noted in Contributions and Thanks Check the new PWM_DynamicFreq example and verify if it's OK now. The library is definitely better and more useful now. Looking forward to receiving more bug reports from you. Best Regards, KH Releases v1.0.2
|
Hi @khoih-prog, Thanks for the quick fix. I will test it asap. Kind regards, |
Hi, Be sure to test using the new and better RP2040_PWM releases v1.0.3 Thanks, Releases v1.0.3
|
Hi Khoi,
Describe the bug
I'm not sure if this is a bug or a "feature", but I wanted to dynamically change the PWM frequency and I'm not able to do so using the setPWM function.
Steps to Reproduce
Example code: https://pastebin.com/raw/bAJ09Jn9
Expected behavior
I was expecting to have 2s of 1000Hz and then 2s of 2000Hz repeatedly.
Actual behavior
Frequency stays constant at 1000Hz.
Thanks,
Américo
The text was updated successfully, but these errors were encountered: