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!

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • I have a development. I plugged the camera into a different power pin on the APM 2.5 and the numbers changed, so i'm guessing there might be something with the 5V supply messing with the pixel values I am sampling. 

    Do you have any suggestions on how to fix this?

  • I guess nobody knows? If anything needs to be clarified please let me know I would like to figure out this problem. 

This reply was deleted.