void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
// Serial.println("Hello, ESP32!");
// pinMode(4, INPUT);
// pinMode(34, INPUT);
analogReadResolution(12);
}
void loop() {
uint16_t avalue=0;
for(uint8_t i=0;i<8;i++)
{
avalue = avalue+(analogRead(34)>>2);
Serial.printf("value:%u, time: %d\n",avalue,i);
}
Serial.printf("Source data : %d, 8bit data: %d\n",avalue,avalue>>5);
//Serial.println(digitalRead(4));
// put your main code here, to run repeatedly:
delay(1000); // this speeds up the simulation
}