0
$\begingroup$

I tried to get the yaw, roll, pitch and throttel integers from the pi to the CC3D with python and c++ as PWM signal over the GPIOs but the output didn't seem to be right or it was delayed. Could someone help me to program an application who knows how to program PWM, PPM, SBus or ExBus? Or does someone know a better way to do it than a serial connection?

$\endgroup$
1
$\begingroup$

The problem is with the Raspberry pi. You can't generate accurate PWM output using Raspberry Pi because it's a microprocessor running an operating system (not real-time system). So you may get unexpected delay in the GPIO.

If you insist in using Raspberry Pi to drive PWM signals, you can use PWM adafruit driver with I2C interface.

However, I think you should really consider redesigning your whole system. Maybe building your own flight controller using Arduino. Then make Raspberry pi talk to the Arduino using serial communication. There are a plenty of tutorials that explain how to do that.

$\endgroup$
  • $\begingroup$ I thought about the raspberry pi 2 uart which is directly coupled with the processoren or the BT chip and got 420 MHz this would be enought for a PWM with a duty cycle between 1ms and 2 ms. $\endgroup$ – Hard_Veur Oct 18 '17 at 20:06
  • $\begingroup$ Only problem I really got zero experience with the uart and don't kniw how to use it. I read the on raspberry website about the uart but this wasn't helpfuf someone who know how to use it? $\endgroup$ – Hard_Veur Oct 18 '17 at 20:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.