Description
Hello,
I am currently programing an ESP32 C3 devboard which has multiple ADC channels and i would like to read data from 3 different sensors.
The problem is that whenever i use analogRead() with any port it always only shows the measurment on GPIO1.
I have tried it on an ESP32C3-WRoom-02 and also on the ESP32-C3 devmodule 02 with the same result.
I simply connected an external power supply to the pins and when connected to GPIO0 it reads the correct value, but on any other pin it only shows an analog value of 700-900 (i.e. floating pin)
Someone on ESP forum has also reported the same issue
Hardware:
Board: ESP32C3 Dev Module
Core Installation version: 2.0.0. alpha1
IDE name: Arduino IDE
Flash Frequency: 80Mhz
PSRAM enabled: no
Upload Speed: 115200
Computer OS: Windows 10
Description:
When trying to read the analog value of any pin with analogRead(pin); it always reads only the value on GPIO0 (ADC1_CHANNAL0). I can can get any other analog-enabled pin to read the value
Sketch:
//Just a super basic analog read sketch
int sensorPin = 3;
int sensorValue = 0;
void setup() {
// declare the sensorPin as an input doesnt change anything:
Serial.begin(115200);
}
void loop() {
// read the value from the sensor:
sensorValue = analogRead(sensorPin);
Serial.println(sensorValue);
delay(100);
}
Debug Messages:
it compiles and uploads perffectly
Metadata
Metadata
Assignees
Type
Projects
Status