ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
bmi160.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome::bmi160 {
8
9class BMI160Component final : public PollingComponent, public i2c::I2CDevice {
10 SUB_SENSOR(accel_x)
11 SUB_SENSOR(accel_y)
12 SUB_SENSOR(accel_z)
13 SUB_SENSOR(temperature)
14 SUB_SENSOR(gyro_x)
15 SUB_SENSOR(gyro_y)
16 SUB_SENSOR(gyro_z)
17
18 public:
19 void setup() override;
20 void dump_config() override;
21
22 void update() override;
23
24 protected:
25 void internal_setup_(int stage);
27 bool setup_stage_(int stage);
28 bool setup_complete_{false};
29};
30
31} // namespace esphome::bmi160
virtual void setup()
Where the component's initialization should happen.
Definition component.cpp:84
This class simplifies creating components that periodically check a state.
Definition component.h:532
bool setup_stage_(int stage)
Run one setup stage; false on an I2C failure.
Definition bmi160.cpp:124
void internal_setup_(int stage)
Definition bmi160.cpp:119
This Class provides the methods to read/write bytes from/to an i2c device.
Definition i2c.h:144
uint16_t temperature
Definition sun_gtil2.cpp:12