ESPHome 2025.5.0
Loading...
Searching...
No Matches
ads1115_sensor.h
Go to the documentation of this file.
1#pragma once
2
5
8
9#include "../ads1115.h"
10
11namespace esphome {
12namespace ads1115 {
13
16 public PollingComponent,
18 public Parented<ADS1115Component> {
19 public:
20 void update() override;
21 void set_multiplexer(ADS1115Multiplexer multiplexer) { this->multiplexer_ = multiplexer; }
22 void set_gain(ADS1115Gain gain) { this->gain_ = gain; }
24 void set_samplerate(ADS1115Samplerate samplerate) { this->samplerate_ = samplerate; }
25 float sample() override;
26
27 void dump_config() override;
28
29 protected:
34};
35
36} // namespace ads1115
37} // namespace esphome
Helper class to easily give an object a parent of type T.
Definition helpers.h:538
This class simplifies creating components that periodically check a state.
Definition component.h:301
Internal holder class that is in instance of Sensor so that the hub can create individual sensors.
void set_samplerate(ADS1115Samplerate samplerate)
void set_resolution(ADS1115Resolution resolution)
void set_gain(ADS1115Gain gain)
void set_multiplexer(ADS1115Multiplexer multiplexer)
Base-class for all sensors.
Definition sensor.h:57
Abstract interface for components to request voltage (usually ADC readings)
AlsGain501 gain
Resolution resolution
Definition msa3xx.h:1
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7