From 90bef0b80b36c36cedd4e6eab4c689ba34c115bf Mon Sep 17 00:00:00 2001 From: TANAKA Masayuki Date: Tue, 16 Jan 2024 22:35:08 +0900 Subject: [PATCH] fix(esp32): Set the maximum value of AnalogRead to 4095 (#9114) The 12-bit MAX is 4095, not 4096. --- libraries/ESP32/examples/AnalogRead/AnalogRead.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/ESP32/examples/AnalogRead/AnalogRead.ino b/libraries/ESP32/examples/AnalogRead/AnalogRead.ino index c238517d380..647e16ba8bd 100644 --- a/libraries/ESP32/examples/AnalogRead/AnalogRead.ino +++ b/libraries/ESP32/examples/AnalogRead/AnalogRead.ino @@ -2,7 +2,7 @@ void setup() { // initialize serial communication at 115200 bits per second: Serial.begin(115200); - //set the resolution to 12 bits (0-4096) + //set the resolution to 12 bits (0-4095) analogReadResolution(12); }