The actual measured voltage at the pin is 3.3v.
Is this normal or is there something wrong.
- if((adc->error = adc_oneshot_read(adc_handle, adc->adc_channel , &(adc->raw_result))) == ESP_OK)
- {
- ESP_LOGI(TAG, "ADC%d Channel[%d] Raw Data: %d",adc->unit_id, adc->adc_channel, adc->raw_result);
- if (do_calibration == ESP_OK)
- {
- adc->error = adc_cali_raw_to_voltage(adc_cali_handle, adc->raw_result, &(adc->millivolts));
- ESP_LOGI(TAG, "ADC%d Channel[%d] Calibrated Data: %d",adc->unit_id, adc->adc_channel, adc->millivolts);
- }
- }
adc_gpio_read: ADC0 Channel[2] Raw Data: 4095
adc_gpio_read: ADC0 Channel[2] Calibrated Data: 3114
Also then doing a resistance calculation on a voltage divider (using the calibrated millivolts) I need to use 3.25 instead of 3.3v as the supply voltage to get reasonable resistance values across the unknown side of the divider.