ESPHome
2026.11.0b6
Loading...
Searching...
No Matches
esphome
components
as5600
sensor
as5600_sensor.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/component.h
"
4
#include "
esphome/core/hal.h
"
5
#include "
esphome/core/preferences.h
"
6
#include "
esphome/components/i2c/i2c.h
"
7
#include "
esphome/components/sensor/sensor.h
"
8
#include "
esphome/components/as5600/as5600.h
"
9
10
namespace
esphome::as5600
{
11
12
class
AS5600Sensor
final :
public
PollingComponent
,
public
Parented
<AS5600Component>,
public
sensor::Sensor
{
13
SUB_SENSOR(raw_position)
14
SUB_SENSOR(
gain
)
15
SUB_SENSOR(magnitude)
16
SUB_SENSOR(
status
)
17
18
public
:
19
void
update
()
override
;
20
void
dump_config()
override
;
21
22
void
set_out_of_range_mode(
OutRangeMode
oor_mode) { this->
out_of_range_mode_
= oor_mode; }
23
OutRangeMode
get_out_of_range_mode() {
return
this->
out_of_range_mode_
; }
24
25
protected
:
26
OutRangeMode
out_of_range_mode_
{
OUT_RANGE_MODE_MIN_MAX
};
27
};
28
29
}
// namespace esphome::as5600
as5600.h
status
uint8_t status
Definition
bl0942.h:8
esphome::Parented
Helper class to easily give an object a parent of type T.
Definition
helpers.h:2160
esphome::PollingComponent
This class simplifies creating components that periodically check a state.
Definition
component.h:532
esphome::PollingComponent::update
virtual void update()=0
esphome::as5600::AS5600Sensor
Definition
as5600_sensor.h:12
esphome::as5600::AS5600Sensor::out_of_range_mode_
OutRangeMode out_of_range_mode_
Definition
as5600_sensor.h:26
esphome::sensor::Sensor
Base-class for all sensors.
Definition
sensor.h:48
component.h
hal.h
preferences.h
i2c.h
gain
AlsGain501 gain
Definition
ltr_definitions_501.h:3
esphome::as5600
Definition
as5600.cpp:4
esphome::as5600::OutRangeMode
OutRangeMode
Definition
as5600.h:26
esphome::as5600::OUT_RANGE_MODE_MIN_MAX
@ OUT_RANGE_MODE_MIN_MAX
Definition
as5600.h:32
sensor.h
Generated by
1.12.0