So here is what I'm having trouble with now. I wrote a driver for a CMOS chip and then I also have some code that will calculated the optical flow using the images from the camera. My code works perfect on the Arduino MEGA, but when I plug it into the APM 2.5 the numbers I get are completely wrong. Here are the pins that I am using
// Digital (PL4 PWM (APM Pin Output 10) (Arduino Pin 45)
// Digital (PH3) PWM (APM Pin Output 5) (Arduino Pin 6)
// Digital (PE3) PWM (APM Pin Output 8) (Arduino Pin 5)
// Digital (PE5) PWM (APM Pin Output 6) (Arduino Pin 3)
// Digital (PE4) PWM (APM Pin Output 7) (Arduino Pin 2)
// Analog (PF0) ADC (APM Pin Input A0) (Arduino Pin A0)
Is there a difference between programming the 2560 on the APM and the 2560 on the MEGA. Also the pads on the back of the APM 2.5 for pin A10 do they need to be connected so it can do PWM?
Thanks in advance for the help!