Closed badfrogg closed 6 years ago
so a little background, this project mostly just utilizes johnny-five under the hood. Johnny-five started out with Arduino support over serial cables using the firmata protocol. This gives us a bunch of apis like pwmWrite() which gives us a way to set the duty cycle, but not the frequency. The frequency is determined under the hood by the IO plugin johnny-five is using. In this case https://github.com/julianduque/beaglebone-io
I'm not sure if there's hardware APIs you can use to customize beaglebone-io for frequency, but if you can, you can use an edited/forked beaglebone-io with node-red-contrib-gpio and have access to the io
variable in the johnny-five node.
Thanks for that explanation. I was trying to read your source code and was kinda seeing that but my JavaScript is still very amateur.
Did someone found a way to change the frequency?
Can you explain how the PWM frequency is set Please? I have PWM in use on a Beaglebone Black and have no problem controlling the duty cycle but the frequency is at 2khz and I need to increase it to something above the audible range.