I am building a quadcopter controlling the ESC with arduino. The first two ESC were going fine and working as intended these were located on pin 9&10, but when I hooked up the third one on pin 13 it did not work. (I used those pins, because those pins are PWM pins) I was asking around on reddit and there someone said that pin 9&10 are using 980 hertz and the other pins are using 490 hertz. Is this the issue and is it resolvable? Or is it something else that i did wrong.
Using this code:
EDIT:
also the tx light goes on when I use the 13 pin. This does not happen with the other pins.
well the code has an esc library that is based on the servo library. It creates a servo object and adds some extra stuff or should I do it differently?
addressing the esc with different code than I am doing now, because you say i should use the servo library, but the ESC library is based on the servo library.
I don't understand your question.
If you are using the Servo library, or a library derived from it, then you are not using either 490 or 980 Hz hardware PWM.
The Servo library can use any pin, but disables hardware PWM on pins 9 and 10.
Please post the code you're using. Without that it is really difficult to see if you should be doing anything different. The link to the library is interesting and it does appear to use the normal Servo library. But we need to see how you are trying to use it.
Since it is using Servo it doesn't need PWM pins just normal digital pins so pick a different one. Pin13 is usually a bad idea precisely because it is linked to the onboard LED.
well i just got my genuine arduino uno in the mail and using pin 6, 9,10 and 11 it works, so maybe it is a faulty arduino nano. I did order it from china for 2 dollars. I will be looking into this and posting my code in a while. Thanks so far