Esp32s3 How to recycle the used ADC pin in the idf framework, for example, when I use gpio4 as the ADC pin, I need it to send low level after the ADC measurement, but the following code does not work. When using gpio_ reset_ pin(4); The restart will be triggered when the statement is commented out, but the following code will not take effect
adc1_config_width(ADC_WIDTH_BIT_12);
adc1_config_channel_atten(ADC1_CHANNEL_3, ADC_ATTEN_DB_11);
int adc_val = adc1_get_raw(ADC1_CHANNEL_3);
ESP_LOGI(TAG, "adc_test");
gpio_reset_pin(4);
vTaskDelay(pdMS_TO_TICKS(1000));
ESP_LOGI(TAG, "poweroff");
gpio_set_direction(4, GPIO_MODE_OUTPUT);
gpio_set_level(4, 0);
vTaskDelay(pdMS_TO_TICKS(200));
gpio_set_level(4, 1);
Esp32s3 How to recycle the used ADC pin in the ESP-IDF
Who is online
Users browsing this forum: Groot_05 and 105 guests