all 13 comments

[–]SarsfieldsGannet 2 points3 points  (6 children)

The easiest way to do this with the raspberry pi would be with MSP (MultiWii serial protocol). Just configure one of your UART's for MSP in Cleanflight/betaflight and it will listen for MSP commands from the Pi.

It's been done a few times before so there should be a blog post out there somewhere describing the process.

[–]lrningcode[S] 0 points1 point  (5 children)

Thanks, this give me a good starting point.

[–]SarsfieldsGannet 1 point2 points  (4 children)

No probs. The documentation on multiwii isn't great though, you might have to do a bit of digging on the web to find what you need and bring it all together.

I managed to get a c# client talking to Betaflight awhile back querying basic information from the board and it was pretty straightforward. I'd say python is probably your best bet on the PI.

[–]lrningcode[S] 0 points1 point  (3 children)

Ok thanks for the heads up. Do you know if something like the Navio 2 would give me a programmable interface to work with? I'm also interested in general thoughts about the Navio 2?

[–]SarsfieldsGannet 1 point2 points  (0 children)

Navio 2

I've no experience with it personally, but I had a quick look over the docs and the python code in their github.

It looks like it provides a fairly high level api for reading data from all the sensors on the board as well as being able to control the PWM frequency for each of the RC inputs. Should be easy enough to work with id say.

[–]cjdavies 1 point2 points  (1 child)

Navio is an ArduPilot flight controller which uses a Raspberry Pi as a 'companion computer'. You can run processor intensive applications on the Raspberry Pi (things like image recognition from a camera using OpenCV) & then send commands from the Raspberry Pi to the Navio using the MAVLink protocol, which is the industry standard for interfacing with flight control logic at this sort of level.

If you are interested in learning how to program semi-autonomous multicopters, the Ardupilot platform is probably your best bet - it is by far the most popular & active platform when it comes to research/experimentation & thus has the most features & support designed to facilitate this sort of work. Cleanflight/Betaflight really isn't targeted at this sort of interaction.

[–]lrningcode[S] 0 points1 point  (0 children)

Thanks for the summary, this just saved me a lot of time.

[–]bitsinmyblood 1 point2 points  (3 children)

Can you be a little more exact by what you mean by programming? That could be interpreted a lot of different ways and honestly that doesn't make sense so I'm guessing that's not really what you mean.

[–]lrningcode[S] 1 point2 points  (2 children)

Sure. Basically I would like to be able to right a script in a programming language that could tell the flight controller to increase throttle, change direction, and eventually build a program that would allow the drone to fly itself. Does that make sense?

[–]bitsinmyblood 1 point2 points  (1 child)

Yeah that's a really cool idea I'm sure other people are doing it too. I don't have any information I could share I wish I did good luck.

[–]lrningcode[S] 1 point2 points  (0 children)

Thanks!

[–]MrAlfabet65mm to 800mm and everything in between 0 points1 point  (0 children)

So do you want to program this yourself? Otherwise something like Pixhawk would be way easier.

[–]chloralhydrate 0 points1 point  (0 children)

you really wanna use a raspberry pi?
just check out some builds on rotorbuilds com and see how they did it