void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32-S3!");
// initialize serial communication at 115200 bits per second:
Serial.begin(115200);
//set the resolution to 12 bits (0-4096)
analogReadResolution(12);
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
int i;
// read the analog / millivolts value for pin 1:
i=0;
for (i=0;i<=20;i++)
{
int analogValue = analogRead(i);
int analogVolts = analogReadMilliVolts(i);
// print out the values you read:
Serial.println (i);
Serial.printf("ADC analog value = %d\n",analogValue);
Serial.printf("ADC millivolts value = %d\n",analogVolts);
delay(1000); // delay in between reads for clear read from serial
}
}