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?
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.