14 void setup()
override;
40 uint32_t switch_delay_;
47 void update()
override;
52 void set_pin(uint8_t pin) { this->pin_ = pin; }
55 float sample()
override;
Abstract interface for components to request voltage (usually ADC readings)
void set_pin_s2(GPIOPin *pin)
set the pin connected to multiplexer control pin 2
This class simplifies creating components that periodically check a state.
void set_pin_s1(GPIOPin *pin)
set the pin connected to multiplexer control pin 1
void set_pin_s0(GPIOPin *pin)
set the pin connected to multiplexer control pin 0
void dump_config() override
void set_pin(uint8_t pin)
void set_switch_delay(uint32_t switch_delay)
set the delay needed after an input switch
void activate_pin(uint8_t pin)
setting pin active by setting the right combination of the four multiplexer input pins ...
voltage_sampler::VoltageSampler * source_
The sampling source to read values from.
void set_pin_s3(GPIOPin *pin)
set the pin connected to multiplexer control pin 3
float get_setup_priority() const override
Implementation of SPI Controller mode.
void set_source(voltage_sampler::VoltageSampler *source)
Base-class for all sensors.
CD74HC4067Component * parent_
void setup() override
Set up the internal sensor array.