How many number of analog pins does APM 2.0 have?

According to the DIYdrone website, APM 2.0 should have 12 analog pins. However, when I tested it out, only A0~A8 which corresponds to 54~62 work as analog pins, but the rest 3 pins do not work. I tested this with an airspeed sensor. The following code is what I used for tests. Does anyone know what I am doing wrong?

-------------------------------------------------------------------------------------------------------------------------------------------------

int val1 = 0; // variables to store the value read

void setup()
{
Serial.begin(38400); // setup serial
}

void loop()
{
val1 = analogRead(63); // read the input pin (it varies from pin 54 to 65)
Serial.print("Analog 63: ");
Serial.print(val1); // debug value
Serial.print("\n");
}

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

Join diydrones

Email me when people reply –

Replies

  • Never mind. Problem solved.

This reply was deleted.

Activity

Derrick Davies liked lisa TDrones's profile
Wednesday
xemone liked Max Gilson's profile
Aug 31
nick rymer left a comment on ArduCopter User Group
"I recently switched laptops and now have Windows 10. I installed Mission Planner on my laptop and plugged a mRo SiK Telemetry Radio into the USB port. The radio is not recognized on the com ports but is instead on the "Other Devices" tab in Device…"
Aug 20
More…