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

1                                          12

2                                          11

3                                          8

4                                          7

5                                          6

6                                          3

7                                          2

8                                          5

Views: 1481

Replies to This Discussion

@emile,

Nice work, very informative.

Regards,

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?

Thanks.

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.

As we can see on the scehmatics here,

http://freeimu.varesano.net/sites/freeimu.varesano.net/files/forum_...

The mega pins do indeed map to the APM pins.

However,

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.

Attachments:

RSS

© 2017   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service