I suspected a bad output on one of my APM 2.5 boards and wrote an arduino sketch to check out the ports. They were all working OK. Here is the correlation between APM pin numbers and Arduino pin numbers:
APM output pin number Arduino 2560 pin number
Nice work, very informative.
TCIII ArduRover2 Developer
Very informative. How did you correlate outputs on apm 2.5 to 2560? Also.can you show the sketch
that you have written?
Do you think this would apply to all arduino boards with the same number of pins?
I'm waiting for my Uno to arrive to do what you're doing.
Unfortunately NO. As far as I know, the pinouts are different between various flavors of Arduino.
If you are thinking of implementing APM code on a UNO, I do not think it will work due to memory limitations.
I am no Arduino expert though, so feel free to experiment.
My code is crude but effective but I do not want to put it into public distribution. However, if you want to play with it, PM me with your email address and I will send it to you "as is, without warranty, etc," ;-)
First of all, I am very sorry to bring this old forum up again.
I am looking into writing an arduino sketch for the APM, and found this forum really intrestring.
The mega pins do indeed map to the APM pins.
when looking into the input pins,
We will see that they are connected to the 32U2-MU chip (USB).
I have searched into the APM git code,
but I couldn't manage to find the way those pins are read.
Is there any way to read the APM input pins (on the 32U2-MU chip) into arduino mega sketch for the 2560 chip?
Thanks in advance.