-
Notifications
You must be signed in to change notification settings - Fork 151
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
High Resolution PWM control #140
Comments
I'm not sure I understand your requirement. Do you need a higher resolution of the duty cycle (e.g 16 bits) or a way to set the frequency (for which there's currently no option in the protocol)? |
Yap, I need a high-resolution duty cycle and the current protocol does not directly support it. (But it is not a problem, can be easily modified to achieve that ) |
That's not exactly correct. To use more than 14 bits for the PWM resolution, you can use the EXTENDED_ANALOG message (described here) instead of the fixed-length ANALOG_MESSAGE. To take advantage of this, you need a board that supports the higher resolution, of course. |
I used an Arduino MEGA2560 and I can change some registers to let it support higher resolution. After that, it becomes a little bit different since I cannot directly call Arduino analogWrite() method. |
|
I have a problem with the current protocol to control Arduino to generate high-resolution PWM. Since some Arduino can config some timers from 8-bit to 16-bit such that PWM can be controlled more accurately. However, due to the current protocol design, it can only transfer 14-bit of data for PWM control.
In my project, I have to change Arduino Firmata Express and Python Pymata4 to achieve a maximum transfer of 21-bit to achieve this case of use.
Just wondering if anyone else needs this feature.
The text was updated successfully, but these errors were encountered: