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

DIY Robocars via Twitter
1 hour ago
DIY Robocars via Twitter
RT @BackyardRobotcs: After an admittedly long wait, the new Tinymovr R3.3 motor controller is now available https://tinymovr.com 🥳
3 hours ago
DIY Robocars via Twitter
RT @_JonMyer: 🏎 1 hr left before the #AWS #DeepRacer Community 🏎 Top 5 Race tomorrow LIVE on Twitch 1st Place = $50 Amazon GC or AWS Credit…
4 hours ago
DIY Robocars via Twitter
Friday
DIY Robocars via Twitter
Thursday
DIY Robocars via Twitter
Wednesday
DIY Robocars via Twitter
RT @davidfsmith: Race virtually with The AWS DeepRacer Community Race and then join us on the track to see how your times compare on the ph…
Wednesday
DIY Robocars via Twitter
Wednesday
Hiroki Tanaka liked Hiroki Tanaka's profile
Wednesday
DIY Robocars via Twitter
RT @breadcentric: It's now!
Oct 13
DIY Robocars via Twitter
RT @SahikaGenc: Happy Prime Day! AWS DeepRacer is available at a 30% discount today! @sunilmallya #AWSDeepRacer https://www.amazon.com/AWS-DeepRacer-Fully-autonomous-developers/dp/B07JMHRKQG/ref=sr_1_5?dchild=1&keywords=deepracer&qid=1602609599&sr=8-5
Oct 13
DIY Robocars via Twitter
RT @chr1sa: Printing all the parts for @DIYRobocars https://t.co/ygRxBBBQbi
Oct 11
DIY Robocars via Twitter
RT @chr1sa: Cool new @donkey_car controller app (iOS or Android). Can even do training in-app. Impressive! cc @DIYRobocars https://t.co/XD…
Oct 11
DIY Robocars via Twitter
RT @chr1sa: Drifting with @donkey_car! This is an example of the fully autonomous @DIYRobocars we race monthly now (virtually, in the shar…
Oct 10
DIY Robocars via Twitter
Oct 9
DIY Robocars via Twitter
RT @breadcentric: AWS DeepRacer: From zero to racing in 90 minutes https://youtu.be/x9z_cUa1xWQ 🗓️ Monday 12 Oct 2020 22:00 BST 14:00 PST 8:00 A…
Oct 9
More…