This API provides convenient way to configure ADC1 for reading from ULP. Otherwise it may affect the measurement of low value signal from the sensor. Do not connect anything else to these pins and do not change their configuration. Note that even the hall sensor is internal to ESP32, reading from it uses channels 0 and 3 of ADC1 (GPIO 36 and 39). It is also possible to read the internal hall effect sensor via ADC1 by calling dedicated function hall_sensor_read(). Single Read mode ADC example can be found in peripherals/adc/single_read directory of ESP-IDF examples. Reading width of ADC2 should be set as a parameter of adc2_get_raw() instead of in the configuration functions. Then it is possible to read ADC conversion result with adc1_get_raw() and adc2_get_raw(). The reading width of ADC2 is configured every time you take the reading.Īttenuation configuration is done per channel, see adc1_channel_t and adc2_channel_t, set as a parameter of above functions. For ADC1, configure desired precision and attenuation by calling functions adc1_config_width() and adc1_config_channel_atten().įor ADC2, configure the attenuation by adc2_config_channel_atten().
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |