monteslu / node-red-contrib-gpio

A set of node-red nodes for connecting to johnny-five IO Plugins
MIT License
41 stars 31 forks source link

Raspberry Pi to Arduino firmata PWM #35

Open Ch3fk0ch88 opened 6 years ago

Ch3fk0ch88 commented 6 years ago

Hello, i just a Raspberry Pi 3b+ witch is connected to a MEGA 2560. I want to controll the Mega 2560 with Node-Red which is installed at the Pi to change the speed of PWM Fans. The Problem is that i need a frequency of 25kHz, is there a way to change it?

Thanks

Ch3fk0ch88 commented 6 years ago

Can Nobody help me?

monteslu commented 6 years ago

take a look at my comment on this issue: https://github.com/monteslu/node-red-contrib-gpio/issues/31

Ch3fk0ch88 commented 6 years ago

I did before i posted this. But this only works at these Beaglebone things. I have no idear how i can do it on the Raspberry. Installing the Beaglebone-io and than change the pwm frequency dont work.

monteslu commented 6 years ago

Do you want to do it on the pi or on the connected arduino? Arduino doesn't let you change the frequency: https://www.arduino.cc/reference/en/language/functions/analog-io/analogwrite/

The raspberry pi itself has 2 PWM pins, but I'm not sure if it's possible to change that frequency either

Ch3fk0ch88 commented 6 years ago

I controll the Arduino with the Pi, so i think i have to change the frequency at the Arduino.

It is really not possible to change the frequency of the Arduino?

monteslu commented 6 years ago

Correct. You can't change it in Arduino.

Ch3fk0ch88 commented 6 years ago

And when i change it in the Pi it not change the Output of the Arduino... Crap---

Ch3fk0ch88 commented 6 years ago

It is possible to change the frequency in the Firmata. I just still not find a way how to change it to 25kHz, just 31kHz etc.