7 static const char *
const TAG =
"as5600.sensor";
10 static const uint8_t REGISTER_ZMCO = 0x00;
11 static const uint8_t REGISTER_ZPOS = 0x01;
12 static const uint8_t REGISTER_MPOS = 0x03;
13 static const uint8_t REGISTER_MANG = 0x05;
14 static const uint8_t REGISTER_CONF = 0x07;
17 static const uint8_t REGISTER_ANGLE_RAW = 0x0C;
18 static const uint8_t REGISTER_ANGLE = 0x0E;
21 static const uint8_t REGISTER_STATUS = 0x0B;
22 static const uint8_t REGISTER_AGC = 0x1A;
23 static const uint8_t REGISTER_MAGNITUDE = 0x1B;
28 LOG_SENSOR(
"",
"AS5600 Sensor",
this);
51 LOG_UPDATE_INTERVAL(
this);
61 this->
parent_->read_byte_16(REGISTER_MAGNITUDE, &value);
73 auto pos = this->
parent_->read_position();
74 if (!pos.has_value()) {
80 if (!
raw.has_value()) {
sensor::Sensor * angle_sensor_
const float DATA
For components that import data from directly connected sensors like DHT.
void status_set_warning(const char *message="unspecified")
OutRangeMode out_of_range_mode_
sensor::Sensor * position_sensor_
AS5600Component * parent_
float get_setup_priority() const override
sensor::Sensor * gain_sensor_
void status_clear_warning()
sensor::Sensor * raw_position_sensor_
void publish_state(float state)
Publish a new state to the front-end.
sensor::Sensor * raw_angle_sensor_
Implementation of SPI Controller mode.
void dump_config() override
sensor::Sensor * magnitude_sensor_
sensor::Sensor * status_sensor_