Arduino & pixhawk

Hey guys I’m trying to build a drone that works on audio hence I’m using an audio sensor and giving the output of it to pixhawk via Arduino I’m not sure how to program the pixhawk and arduino to work together.
Motive: on or off the pixhawk via audio
Also to fly up and down the drone via audio
Please help me I’m stuck
Whether to use mavlink or mission planner or any other software

What you are trying to do will be difficult, and you’ll need to understand a good deal of how ArduPilot works to be successful.

To connect the Arduino to the PixHawk, I think that I would use i2c. But you’ll need to essentially implement a new sensor inside the ArduPilot firmware and also choose an appropriate mode (or make one) to accomplish the desired behavior.

How do I program pixhawk to work according to the inputs provided by arduino?

You are asking a very open-ended question. This is not a question someone can help with in a simple manner.

If you want help, it would be useful to ask a more specific question. Consider explaining what specific result you desire, what you already understand about how to implement it, and what you don’t understand/where you are stuck.

I’m stuck on how should I integrate my pixhawk with arduino. So that my pixhawk drive my motors accordingly.

You want to attach the arduino with the audio sensor (microphone?) to the copter?
I highly doubt this will work. Copters make all kinds off noises and the audio sensor will most likely not hear anything besides the noise. It might work if you use a set of specific tones like DTMF and emit them really loud. A more feasible idea might be to add voice recognition to a traditional TX set, but I would not use it for flight or safety critical commands like arming or flightmodes. Controlling accessories like cameras or payload might be possible.

For now I’m just Focusing on Audio controls like on and off soo I’ve connected the audio sensor with arduino but now I’m confused on I should connect the Arduino directly to the motors or through pixhawk

You will have to give more detail of what you are planning to do. What do you mean by on/off? A Pixhawk can be armed/disarmed, it has an optional safety switch and the battery can be plugged in or not. Overriding any of those with an audio control seems very dangerous to me.

Yes, by on off I meant arming and disarming the pixhawk.

  1. The geetech voice recognition module will detect the human voice

  2. It will send the respective high signal to arduino

  3. The Arduino will send the signal to pixhawk

  4. The pixhawk will do the operations respectively

Also the human voices we are targeting is on/off getup/down

For this you have yo work at a higher level and control the vehicle with drone kit python.
Look at this example using visual control: Soubhi Hadri's hand gesture recognition and control of an ArduPilot multicopter