Skip to content

ESP32-S2 analogRead function not returning correct value #5691

Closed
@brentru

Description

@brentru

Hardware:

Board: Adafruit FunHouse ESP32-S2
Core Installation version: 2.0.0
IDE name: Arduino IDE
Flash Frequency: 80Mhz
PSRAM enabled: Yes
Upload Speed: 115200
Computer OS: macOS and Ubuntu

Description:

Calls to Arduino's analogRead (https://www.arduino.cc/reference/en/language/functions/analog-io/analogread/) function are not working on BSP v2.0.0. It seems to always return a value of 0, instead of the correct value from the ADC. This functionality was working prior to 2.0.0.

image

Sketch: (leave the backquotes for code formatting)

void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.println(analogRead(A3));
  delay(100);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions