Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPIO05 ADC Not Available on seeed_xiao_esp32c3 #4136

Open
nkgiovannivl opened this issue Feb 6, 2023 · 2 comments
Open

GPIO05 ADC Not Available on seeed_xiao_esp32c3 #4136

nkgiovannivl opened this issue Feb 6, 2023 · 2 comments
Labels

Comments

@nkgiovannivl
Copy link

The problem

Setting GPIO05 is showing "ESP32C3 doesn’t support ADC on this pin." , but the reference pins shows me that GPIO05 it’s available.

image

Which version of ESPHome has the issue?

2022.12.8

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2023.2.2

What platform are you using?

ESP32-IDF

Board

seeed_xiao_esp32c3

Component causing the issue

sensor platform: adc

Example YAML snippet

esphome:
  name: clamps-my
  platformio_options:
    board_build.flash_mode: dio  

esp32:
  board: seeed_xiao_esp32c3
  variant: esp32c3
  framework:
    type: esp-idf

sensor:                                      

  - platform: adc

    pin: GPIO5

    attenuation: auto

    accuracy_decimals: 5

    id: adc_sensor_ct5

Anything in the logs that might be useful for us?

No response

Additional information

The GPIO05 should be mapped on VARIANT_ESP32C3?

https://github.com/esphome/esphome/blob/034b47c23a08f9980bdae07bcafbcf22fc43dc2e/esphome/components/adc/sensor.py#L76

@oxan
Copy link
Member

oxan commented Feb 12, 2023

The problem is that GPIO5 is used by ADC2, which is also used by the WiFi module: https://docs.espressif.com/projects/esp-idf/en/v4.3/esp32c3/api-reference/peripherals/adc.html

There's an open PR to add support for ADC2 when WiFi is disabled: esphome/esphome#4381

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants