#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include <driver/adc.h>
int adcValue=0;
float voltage=0;
void app_main() {
adc1_config_width(ADC_WIDTH_BIT_12);
adc1_config_channel_atten(ADC1_CHANNEL_0,ADC_ATTEN_DB_11);
while (true) {
adcValue = adc1_get_raw(ADC1_CHANNEL_0);
voltage =(adcValue / 4095.0) * 3.3;
printf("the voltage is: %f \n ",voltage);
vTaskDelay(1000 / portTICK_PERIOD_MS);
}
}