Hey all,
I'm new to DIY Drones and Arduplane in general, so this might be the wrong place for posting this topic--sorry if that's the case!
I am attempting to use the APM 2.5 board to stream arbitrary analog sensor data down to the ground and display it using Mission Planner. A friend told me that it was a simple matter to plug any given analog sensor into one of the analog input ports; and then changing one of the parameters in Mission Planner would cause it to display. He told me to do some searching that it should be easy to find, but I've tried and can't find what I'm looking for. Sorry for the long post, but I have a lot of questions at this point. Thanks in advance to anyone can point me in the right direction! :)
1. I started at the Other Analog Sensors page, which shows a sample sketch for the APM 1.0 board and the analog input pins. In one of the comments, a person is referred to the APM 2.0 board, which appears to have a similar pinout to the 2.5 board; however, in the diagram on the APM 2.0 Board page, in the diagram showing the optional sensors/controls pins, pins 7/8 are listed as NAV LED and RSSI / NAV LED, which leads me to the following two questions: Is the analog input pinout the same between APM 2.0 and APM 2.5? And are pins A7 and A8 still available for arbitrary analog inputs?
2. Okay, so assuming that the all of the other stuff works out and the sensor gets connected and whatnot, what changes to the Mission Planner code need to be made? I haven't ever programmed in C before and I don't have a background in computer science, but I do have a small amount of coding experience... so I'm only partially lost when sifting through the source. I found the Parameters.h file, which defines an enum used somewhere, but that's about as far as I got. Can anyone point me towards the files I'll need to look at?
Thanks so much for the help!
Replies
Hello, anybody still here? I still have an old APM 2.6 and want to know how to add these analog channels in the flight code and the MP code.
Thanks,
Dan
There is the APM specific MAVLink protocol message specified as MAVLINK_MSG_ID_AP_ADC . This message can hold values of ADC1-ADC6. I started searching for mavlink_msg_ap_adc_* named functions that would indicate it was being used (I couldn't find anything though)
if you wanted to add the code your self you could in the slow_loop() for ArduPlane.pde, for example, read the ADCs you where interested in and then send them over MAVLink. Not sure what would need to happen in MP.
Hope that helps get you started.