<< return to Pixycam.com

Pixy to ArduPilot (arduino mega 2580)

Hi all,

This is my first post… It should be in the software area but for some reason I get signed out every time I click software, so I’ll attempt to post in Pixy Hardware instead.

My first Pixy Project:
Overview: an autonomous flying craft that follows a lead craft. At a set altitude pixy will hand all control to ArduPilot. ArduPilot will then take control & fly the craft to several way points eventually landing in a safe area.

Pixy will send signals to 5 servos. ( the 2 onboard pixy cam servos + 3 aircraft servos )

Q1.
Can Pixy control the same flight servos on the craft via Ardupilot’s servo outputs

Q2. How to stop pixy from sending signals to the servos once a designated altitude is reached so as not to interfer with the same servos once Ardupilot takes control ?

Ardupilot is an open source Arduino based flight controller for RC planes, quadcopter, rovers etc…

Any help on this would be really appreciated

Hi Michael,

I don’t know enough about Ardupilot to give you a solid answer. If you could provide a bit more information, or a good resource, on Ardupilot and your specific question, that would be great.

Keep in mind that you can hook up servos directly to Pixy and control them from an SPI-connected Arduino via the Pixy Arduino library. That way you can keep all of the code/logic on the Arduino side yet still utilize Pixy’s object tracking and servo interface.

Scott

Thanks for the reply Scott,

Here’s the software that users are running on Ardupilot
An overview - http://dev.ardupilot.com

ArduPilot software download here - http://ardupilot.com/downloads/?category=6

So my question is … can I control servos via Ardupilot so they adjust according to Pixy’s target position.

for example - Pixy camera target moves up - Ardupilot then sends a signal to servo to move aircraft up.

my original thinking was to have PIXY control the flight servos keeping the target centred & then at a set altitude let Ardupilot take over & fly back to base.

Can you write code on ardupilot specific to your application? Or does this board strictly communicate with the servos/sensors to handle flight? I’m wondering if you can talk to it via SPI and use the Pixy Arduino library on Ardupilot to receive the messages. Then from there you could treat it as a simple tracking program in which you use the delta Y to determine changes in altitude.

Am I greatly over-simplifying this?

Scott

Using Pixy with ArduPilot is exactly what I hope to do someday.

Imagine being able to take your quad to 40 meters above a garden where a wedding takes place, use your on-board Pixy to “see” balloons and aim a laser to pop them :slight_smile: Wedding crashing with some added style!

Kidding (or not!) aside, ArduPilot source code is opensource and available at github: https://github.com/diydrones/ardupilot. I’m pretty sure we can use Pixy library inside ArduPilot and make some cool stuff happen’.