Hello, I am interested in installing any type of sensor to be used (or simply logged) by the APM system. I'm having difficulties sifting through all this information and finding a good example to follow about how the code is written and implemented as well as physical constraints like voltages, digital vs. analog, which pins and so on.
A concrete example that may open door to understanding would be installing both a sonar unit and pitot tube with differential pressure sensor onto a quadrotor which has front assigned to it. Currently, Mission Planner identifies the signals from pins at A0 to be used only for sonar.
This is the airframe I'm currently working with; it has pretty beefy suspension but I'm comfortable from dropping it from waist height without worrying about damage.
A later challenge after getting both the sonar and pitot working will be finding or implementing code that automatically controls yaw to forward face when in simple flight mode because I want to reassign that channel for other uses.
Any thoughts, advice, tutorials would be greatly appreciated.
Thanks, MCB
Replies
Hi Martin,
In response to Adams post here: http://diydrones.com/forum/topics/incporating-sensor-data-into-the-..., I recently wrote some code that allowed me to connect up an external Adruino (Nano) and attached sensors and to send the sensor output values over i2c to log them on the APM. The code pretty simple but it may serve as an example that assists you in your endeavours... Using an external device to monitor (and potentially process) sensor output makes sense when using the APM since it is lacking capacity and you wouldn't want to compromise the flight controller but direct sensor connection should not be a problem on the Pixhawk
James
Thanks for all the input and insights, I look forward to putting them into action.
MCB
These two links were invaluable:
http://copter.ardupilot.com/wiki/programming-arducopter-with-arduino/
http://firmware.diydrones.com/Tools/Arduino/How%20to%20Build%20Ardu...