I'm testing the ESP32's ADC functionality on the SparkFun ESP32 Thing.
Here is my test code :
Code: Select all
ESP_ERROR_CHECK(adc1_config_width(ADC_WIDTH_12Bit));
ESP_ERROR_CHECK(adc1_config_channel_atten(ADC1_CHANNEL_7, ADC_ATTEN_0db));
while (true) {
vTaskDelay(300 / portTICK_PERIOD_MS);
printf("ADC value : %d\n", adc1_get_voltage(ADC1_CHANNEL_7));
}
The measure seems also very noisy, it constantly oscillates on the 4 first bits.
Thank you in advance for your help.