ADC_11db: The input voltage of ADC will be attenuated, extending the range of measurement to up to approx.ADC_6db: The input voltage of ADC will be attenuated, extending the range of measurement to up to approx.ADC_2_5db: The input voltage of ADC will be attenuated, extending the range of measurement to up to approx.ADC can measure up to approximately 800 mV (1V input = ADC reading of 1088). analogSetAttenuation(attenuation): sets the input attenuation for all ADC pins.analogSetClockDiv(attenuation): set the divider for the ADC clock.It has an effect of increasing sensitivity. analogSetSamples(samples): set the number of samples in the range.analogSetCycles(cycles): set the number of cycles per sample.It can be a value between 9 (0 – 511) and 12 bits (0 – 4095). analogSetWidth(width): set the sample bits and resolution.analogReadResolution(resolution): set the sample bits and resolution.There are other more advanced functions to use with the ADC pins that can be useful in other projects. So, if you’re using Wi-Fi and you’re having trouble getting the value from an ADC2 GPIO, you may consider using an ADC1 GPIO instead, that should solve your problem. Note: ADC2 pins cannot be used when Wi-Fi is used. This means that when you read an analog input, its range may vary from 0 to 4095. These analog input pins have 12-bit resolution. Learn more about the ESP32 GPIOs: ESP32 Pinout Reference.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |