ESPHome
2025.7.1
Loading...
Searching...
No Matches
esphome
components
gl_r01_i2c
gl_r01_i2c.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/component.h
"
4
#include "
esphome/components/sensor/sensor.h
"
5
#include "
esphome/components/i2c/i2c.h
"
6
7
namespace
esphome
{
8
namespace
gl_r01_i2c {
9
10
class
GLR01I2CComponent
:
public
sensor::Sensor
,
public
i2c::I2CDevice
,
public
PollingComponent
{
11
public
:
12
void
setup
()
override
;
13
void
dump_config
()
override
;
14
void
update
()
override
;
15
16
protected
:
17
void
read_distance_
();
18
uint16_t
version_
{0};
19
};
20
21
}
// namespace gl_r01_i2c
22
}
// namespace esphome
esphome::PollingComponent
This class simplifies creating components that periodically check a state.
Definition
component.h:422
esphome::gl_r01_i2c::GLR01I2CComponent
Definition
gl_r01_i2c.h:10
esphome::gl_r01_i2c::GLR01I2CComponent::version_
uint16_t version_
Definition
gl_r01_i2c.h:18
esphome::gl_r01_i2c::GLR01I2CComponent::setup
void setup() override
Definition
gl_r01_i2c.cpp:19
esphome::gl_r01_i2c::GLR01I2CComponent::dump_config
void dump_config() override
Definition
gl_r01_i2c.cpp:30
esphome::gl_r01_i2c::GLR01I2CComponent::read_distance_
void read_distance_()
Definition
gl_r01_i2c.cpp:49
esphome::gl_r01_i2c::GLR01I2CComponent::update
void update() override
Definition
gl_r01_i2c.cpp:37
esphome::i2c::I2CDevice
This Class provides the methods to read/write bytes from/to an i2c device.
Definition
i2c.h:133
esphome::sensor::Sensor
Base-class for all sensors.
Definition
sensor.h:62
component.h
i2c.h
esphome
Providing packet encoding functions for exchanging data with a remote host.
Definition
a01nyub.cpp:7
sensor.h
Generated by
1.12.0