# Can't read analog Voltage

**URL:** <https://forum.arduino.cc/t/cant-read-analog-voltage/1443756>\
**Category:** General Guidance\
**Created:** [May 12, 2026, 2:19pm UTC](https://forum.arduino.cc/t/cant-read-analog-voltage/1443756 "2026-05-12T14:19:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tiltschwaiger](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tiltschwaiger/32/1126463_2.png) [@tiltschwaiger](https://forum.arduino.cc/u/tiltschwaiger)\
**Post date:** [May 12, 2026, 2:19pm UTC](https://forum.arduino.cc/t/cant-read-analog-voltage/1443756/1 "2026-05-12T14:19:49Z")

</div>

Hello, I'm kinda losing my mind here. I'm trying to read an analog value using an Original Arduino Nano ESP32. Attached in the link you can see the wiring. It's very basic. Using a multimeter between GND and the orange marked wire I can read the voltage difference as I use the slider. The arduino however reads nothing on the serial monitor. Even if I just hook the analog pin to 3V3 there is nothing read. Software wise, all I'm using is an unmodified "AanalogRead".

Any ideas what the hell I'm doing wrong?

[Wiring](https://postimg.cc/3dpCvVR3)

---

<div class="post-metadata">

**Author:** ![ruilviana](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ruilviana/32/722429_2.png) [@ruilviana](https://forum.arduino.cc/u/ruilviana)\
**Post date:** [May 12, 2026, 2:31pm UTC](https://forum.arduino.cc/t/cant-read-analog-voltage/1443756/2 "2026-05-12T14:31:32Z")

</div>

> [@tiltschwaiger](#):
>
> Arduino Nano ESP32

Using the tags correctly, post your sketch.

---

<div class="post-metadata">

**Author:** ![tiltschwaiger](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tiltschwaiger/32/1126463_2.png) [@tiltschwaiger](https://forum.arduino.cc/u/tiltschwaiger)\
**Post date:** [May 12, 2026, 2:35pm UTC](https://forum.arduino.cc/t/cant-read-analog-voltage/1443756/3 "2026-05-12T14:35:23Z")

</div>

I thought that would be neccessary since I'm using an unmodified example sketech but here you go:

```arduino
void setup() {
  // initialize serial communication at 115200 bits per second:
  Serial.begin(115200);
  
  //set the resolution to 12 bits (0-4096)
  analogReadResolution(12);
}

void loop() {
  // read the analog / millivolts value for pin 2:
  int analogValue = analogRead(2);
  int analogVolts = analogReadMilliVolts(2);
  
  // print out the values you read:
  Serial.printf("ADC analog value = %d\n",analogValue);
  Serial.printf("ADC millivolts value = %d\n",analogVolts);
  
  delay(100); // delay in between reads for clear read from serial
}

```

Quick note:  
I found the solution, the Arduino basic sketch is incorrect. Instead of analogRead(2) it must be analogRead(A2).

---

<div class="post-metadata">

**Author:** ![sterretje](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sterretje/32/391294_2.png) [@sterretje](https://forum.arduino.cc/u/sterretje)\
**Post date:** [May 12, 2026, 3:08pm UTC](https://forum.arduino.cc/t/cant-read-analog-voltage/1443756/5 "2026-05-12T15:08:47Z")

</div>

> [@tiltschwaiger](#):
>
> Instead of analogRead(2) it must be analogRead(A2).

For some boards `2` is "the same" as `A2`; e.g. those boards that are based on the AVR processors (Uno, Mega etc).

---

<div class="post-metadata">

**Author:** ![JohnLincoln](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@JohnLincoln](https://forum.arduino.cc/u/JohnLincoln)\
**Post date:** [May 12, 2026, 5:41pm UTC](https://forum.arduino.cc/t/cant-read-analog-voltage/1443756/6 "2026-05-12T17:41:11Z")

</div>

I don't like that site where you posted the photo of your set-up.  
It tries to install an Ad Blocker, even if you answer 'No'.

It's easy enough to post photos here on the forum.
