Arduino UNO Q Analog Pins Stuck at ~270 with analogReadResolution set to 14

Hi everyone,

I'm seeking help with an Arduino UNO Q where all analog pins A0 -A5 are failing the basic voltage test. I've got this brand-new UNO Q board a few days ago. Thanks for any help in resolving this setup issue!

The Problem: The raw analog reading remains stuck at around 270 regardless of the input.

The Test: I ran the sketch below. When I connected the board's 3.3V pin to A0, the reading did not change from ~270. I’ve tried this on all analog pins and got the same result.

The Sketch:

#include <Arduino_RouterBridge.h>

void setup() {
  Monitor.begin();
  analogReadResolution(14);
  pinMode(A0, INPUT);
}

void loop() {
  Monitor.println(analogRead(A0));
  delay(3000);
}

Hi @hchang. Unfortunately the interaction between pinMode and the analogRead and analogWrite functions is different on the UNO Q than we are accustomed to from other Arduino boards.

pinMode configures the pin as a digital input or output and thus must only be used in the case where you are using the digitalRead or digitalWrite functions with the pin.

In cases like this where you are using the analogRead function, you should remove the pinMode call from the sketch.

So remove this line from your code:

Then upload the sketch once again. Hopefully this time everything will work as expected.

It works after removing pinMode. Thanks much for the support.

You are welcome. I'm glad it is working now.

The Arduino developers are aware of the problem of pinMode being incompatible with analogRead and a provisional fix is in progress: