EZADC
This ESP32 component was made to more easily gather data from the analog-to-digital converter (ADC). It defines a new data structure, ADC, which allows the user to quickly configure and use the ADC.
ADC
To initialize the data structure, one may use the component library as follows:
// Create ADC
ADC my_adc;
// Initialize ADC
init_adc(&my_adc);
// Configure ADC to channel 7
config_adc(&my_adc, 7);
// Read from ADC channel 7
ez_read(&my_adc);
// Tear down ADC when you're done
teardown_adc(&my_adc);
This was originally done to read the battery voltage on the Adafruit Feather HUZZAH32, where the GPIO 35 is connected to ADC channel 7.
