AlfredoSystems / AlfredoCRSF

Arduino CRSF library for ELRS
GNU General Public License v3.0
8 stars 4 forks source link

elrs to servo+motor movement #1

Open Geert92 opened 4 weeks ago

Geert92 commented 4 weeks ago

Hope someone can help me here, I'm trying to build a RC robot where I use DC motors and servo's. I convert the ppm signal to pwm and can individually control a servo or a motor but as soon as I combine them the servo start acting weird. The servo moves about 20 degree one way, and not both ways and also not the full 180 degrees as expected. I did validate the movement without the crsf libary and then works. Looking forward to your help.

BotSpace commented 4 weeks ago

Are you sure this is a problem with the CRSF library? You say that the problem only happens when you combine your motor code and servo code. Perhaps both are trying to use the same internal timer channels. What MCU/toolchain are you using? For example the ESP32 core just had some breaking changes going to 3.0.0, could be related?

If you want more help you will need to post your code.

Geert92 commented 3 weeks ago

Well I'm actually not certain what is the cause TBH, was hoping some here would have a clue what would be happening. So I checked my libary and it is on the latest, so I down graded it to 2.0.17 and that made it work a bit better actually. But now it gives me an issue with the motor input, the motor always spins very slowly, armed unarmed does not make a change. Also when I move the motor stick the servo jitters till a certain level of the input. I have validated that the ELRS input are correct, below the code I'm using now. ELRS_Robotbuild.ino.zip

Hope someone can help me out here, thanks