mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 01:07:45 +01:00
ADC fix: GPIO0 not usable as output if ADC_VCC is used (#1557)
This commit is contained in:
parent
bdf004867d
commit
34d37961c3
1 changed files with 2 additions and 0 deletions
|
@ -16,7 +16,9 @@ void ADCSensor::set_attenuation(adc_attenuation_t attenuation) { this->attenuati
|
|||
|
||||
void ADCSensor::setup() {
|
||||
ESP_LOGCONFIG(TAG, "Setting up ADC '%s'...", this->get_name().c_str());
|
||||
#ifndef USE_ADC_SENSOR_VCC
|
||||
GPIOPin(this->pin_, INPUT).setup();
|
||||
#endif
|
||||
|
||||
#ifdef ARDUINO_ARCH_ESP32
|
||||
analogSetPinAttenuation(this->pin_, this->attenuation_);
|
||||
|
|
Loading…
Reference in a new issue