I am building a bicopter and i had a couple of issues to solved and i have no clue with this one.
For some reason my servo motors tick sometimes. I read that it could be because I am using timers to run the motors and interrupts to get the rc input. I do not have enough experience to figure it out.
Someone that can help? is more that welcome
Attached is my code
I have found the same problem, so I switched to an I2C controlled servo driver board for anything twitches have a detrimental effect on. I find that things like a steady camera, or robot arm, require servos to operate absent of twitches. On the other hand, some things like speed controllers, there is no practical detriment to having slight twitches. Perhaps because of inertia in something already in motion. As well, I've found that some servos are more sensitive to the problem than others.
Thanks for the answer. I think that there is something in the code that i am not capable of figured out.
Bu I will review you answer. I have never used a i2c controller how does it works?
With an I2C controller, the board, such as a pca9685 controller board, around $5.00 from China, you communicate with it using a couple of pins on the Arduino, and different servo control code. The board generates the servo signals for up to 16 servos, and moves the servos based on the code you send down the I2C bus. The Arduino doesn't generate the servo control signal, it only controls it. It's cheap and I've found it 100% steady and glitch free. Not sure if its small size would be a weight issue on your flying machine or not. They weigh around 10 grams.
I got tired of finding shaking servos when running libraries other than just the servo library. There is no doubt some sort of interference with some Arduino libraries and proper servo control. People always say its a power supply issue, but it isn't just that. It can be a power supply issue, but it can be more than that.