ESPHome  2022.6.2
ntc.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 namespace esphome {
7 namespace ntc {
8 
9 class NTC : public Component, public sensor::Sensor {
10  public:
11  void set_sensor(Sensor *sensor) { sensor_ = sensor; }
12  void set_a(double a) { a_ = a; }
13  void set_b(double b) { b_ = b; }
14  void set_c(double c) { c_ = c; }
15  void setup() override;
16  void dump_config() override;
17  float get_setup_priority() const override;
18 
19  protected:
20  void process_(float value);
21 
23  double a_;
24  double b_;
25  double c_;
26 };
27 
28 } // namespace ntc
29 } // namespace esphome
void set_c(double c)
Definition: ntc.h:14
float get_setup_priority() const override
Definition: ntc.cpp:15
double a_
Definition: ntc.h:23
void set_sensor(Sensor *sensor)
Definition: ntc.h:11
double c_
Definition: ntc.h:25
double b_
Definition: ntc.h:24
void process_(float value)
Definition: ntc.cpp:16
void setup() override
Definition: ntc.cpp:9
void set_a(double a)
Definition: ntc.h:12
Definition: a4988.cpp:4
sensor::Sensor * sensor_
Definition: ntc.h:22
void dump_config() override
Definition: ntc.cpp:14
Base-class for all sensors.
Definition: sensor.h:47
void set_b(double b)
Definition: ntc.h:13