mirror of
https://github.com/esphome/esphome.git
synced 2025-02-23 02:51:54 +01:00
ADC fix: GPIO0 not usable as output if ADC_VCC is used (#1557)
This commit is contained in:
parent
bdf004867d
commit
34d37961c3
@ -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 New Issue
Block a user