Cannot find A14-A17 on a Teensy 4.1?

Status
Not open for further replies.
I'm trying to read a pot on my Teensy 4.1, but it's not working. This is on A17. So I wrote the code below to check all analog inputs, but still get nothing. In fact, I get nothing from A14-A17. However, I do see the random fluctuations of unconnected analog inputs for all four of them. I checked all up & down both sides of the board, and A0-A13 are ok, but not A14-A17.

This board is relatively new. I bought it a couple months ago, but only just started playing with it this past week. I used my USB microscope to check for physical damage around those pins & traces, but saw nothing obvious.

What am I missing?

Code:
void setup()
{                
  Serial.begin(38400);
}

void loop()                     
{
  Serial.println("----");
  Serial.println(analogRead(0));
  Serial.println(analogRead(1));
  Serial.println(analogRead(2));
  Serial.println(analogRead(3));
  Serial.println(analogRead(4));
  Serial.println(analogRead(5));
  Serial.println(analogRead(6));
  Serial.println(analogRead(7));
  Serial.println(analogRead(8));
  Serial.println(analogRead(9));
  Serial.println(analogRead(10));
  Serial.println(analogRead(11));
  Serial.println(analogRead(12));
  Serial.println(analogRead(13));
  Serial.println(analogRead(14));
  Serial.println(analogRead(15));
  Serial.println(analogRead(16));
  Serial.println(analogRead(17));
  delay(250);
}
 
analogRead(13) technically means to try to read voltage on pin 13. But pin 13 is digital only. It don't have analog input capability.

Very early versions of Arduino used plain numbers 0 to 5, rather than A0 to A5 (those early Arduino boards only had 6 analog inputs).

For backwards compatibility, we still support using plain numbers. But that only works up to pin 13, because pin 14 is A0.
 
Status
Not open for further replies.
Back
Top