![]() 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. |