Autonomous drone using rasberry pi


I'm currently working on an autonomous drone project. I've put a drone together a few months ago and now I'm trying to switch the receiver on board for a rasberry pi to autonomize the drone. My goal is to get rid of the transmitter and reciever altogether and only use code to activate the motors.

I've removed the cables from the receiver channels and connected them to my rasberry pi GPIOs. The problem is that my flight controller is showing no signal for each of the channels. When I use GPIo_Output(channel,True)
and look at my flight cotroller's receiver signal test the No Signal changes briefly to 0 and then back to No signal for one of the Roll/Pitch/Yaw/Throttle depending on which GPIO output I use.

I would like to know why I can't get the No Signal to change to the 0 for a longer period of time and also why the GPIo_Output(channel,True) doesn't change the No Signal to 0 as long as there is no sleep(x) and output set to False in the code below it.

If you can provide any advice, I will be very thankful.

P.S : I'm using the KK2.1.5 as my flight controller. And thank you for reading this, I know it's not very easy to understand, but I tried my best to explain my problem as simply as possible.


Distinguished Member
If you connect a standard servo, what does it do? I find this is normally the best way of working out what a servo channel is doing!


Distinguished Member
I like the idea of what you are doing , but I’m pretty certain your outside the law by doing it ...


Distinguished Member
Good point, but if you have a data link to the Pi that will suffice - so long as you can send a command to land or deactivate the drone. You would need to retain visual line of sight to the drone as well of course.

My drone uses a PX4 flight controller and can be controlled via the radio control or telemetry link. If it loses both it will return to its take off point and land without further command.


Distinguished Member
I like the idea of what you are doing , but I’m pretty certain your outside the law by doing it ...

My immediate thought too but then saw that the OP is from Switzerland so may be different there.

I agree with @noiseboy72 - too many moving parts in the problem at the moment. Take the Flight Controller and ESCs out of the equation and use a servo to see if you can get that to move as expected.



The latest video from AVForums

Paramount + UK launch: Halo, Star Trek and Beavis, and all the latest 4K + Movie/TV News
Subscribe to our YouTube channel
Support AVForums with Patreon

Top Bottom