ESPHome  2024.11.1
jsn_sr04t.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 
8 
9 namespace esphome {
10 namespace jsn_sr04t {
11 
12 enum Model {
15 };
16 
18  public:
19  void set_model(Model model) { this->model_ = model; }
20 
21  // ========== INTERNAL METHODS ==========
22  void update() override;
23  void loop() override;
24  void dump_config() override;
25 
26  protected:
27  void check_buffer_();
29 
30  std::vector<uint8_t> buffer_;
31 };
32 
33 } // namespace jsn_sr04t
34 } // namespace esphome
This class simplifies creating components that periodically check a state.
Definition: component.h:283
std::vector< uint8_t > buffer_
Definition: jsn_sr04t.h:30
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
Base-class for all sensors.
Definition: sensor.h:57