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

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…