Open Levi-Lesches opened 11 months ago
Good idea. Yes, this seems like something I can add in the fall. Code contributions are most welcome as well.
is there any update on that?
No, nothing yet. I'm hoping to publish 1.0 soon with support for Dart 3.x, but have not had time to work on the PWM feature at all.
rpi_gpio.dart/lib/src/native/rpi_gpio_ext.cc Line 300 in 42cc561 pwmSetClock(32); // 19.2 / 32 = 600KHz - Also starts the PWM
Tried to change clock to other value but seems it now working. Basically i just want to set freq to ~50Hz but seems it's more complex than I thought. Any idea how I can reach this?
As of
v0.8.1
, theGPIOPwm
class has adutyCycle
setter, but I can't find anything to set the frequency. Are there plans to add such a feature?I checked the native code: https://github.com/danrubel/rpi_gpio.dart/blob/42cc561b28088434b6abfc130ec2ec3cdbf68b51/lib/src/native/rpi_gpio_ext.cc#L300
Seems like this is hard-coded