ESPHome  2024.12.2
m5stack_8angle_sensor.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 #include "../m5stack_8angle.h"
7 
8 namespace esphome {
9 namespace m5stack_8angle {
10 
12  public PollingComponent,
13  public Parented<M5Stack8AngleComponent> {
14  public:
15  void update() override;
16  void set_channel(uint8_t channel) { this->channel_ = channel; };
17  void set_bit_depth(AnalogBits bits) { this->bits_ = bits; };
18  void set_raw(bool raw) { this->raw_ = raw; };
19 
20  protected:
21  uint8_t channel_;
23  bool raw_;
24 };
25 
26 } // namespace m5stack_8angle
27 } // namespace esphome
uint8_t raw[35]
Definition: bl0939.h:19
This class simplifies creating components that periodically check a state.
Definition: component.h:283
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
Base-class for all sensors.
Definition: sensor.h:57
Helper class to easily give an object a parent of type T.
Definition: helpers.h:530