ESPHome  2024.10.2
mpu6050.h
Go to the documentation of this file.
1 #pragma once
2 
6 
7 namespace esphome {
8 namespace mpu6050 {
9 
11  public:
12  void setup() override;
13  void dump_config() override;
14 
15  void update() override;
16 
17  float get_setup_priority() const override;
18 
19  void set_accel_x_sensor(sensor::Sensor *accel_x_sensor) { accel_x_sensor_ = accel_x_sensor; }
20  void set_accel_y_sensor(sensor::Sensor *accel_y_sensor) { accel_y_sensor_ = accel_y_sensor; }
21  void set_accel_z_sensor(sensor::Sensor *accel_z_sensor) { accel_z_sensor_ = accel_z_sensor; }
22  void set_temperature_sensor(sensor::Sensor *temperature_sensor) { temperature_sensor_ = temperature_sensor; }
23  void set_gyro_x_sensor(sensor::Sensor *gyro_x_sensor) { gyro_x_sensor_ = gyro_x_sensor; }
24  void set_gyro_y_sensor(sensor::Sensor *gyro_y_sensor) { gyro_y_sensor_ = gyro_y_sensor; }
25  void set_gyro_z_sensor(sensor::Sensor *gyro_z_sensor) { gyro_z_sensor_ = gyro_z_sensor; }
26 
27  protected:
35 };
36 ;
37 
38 } // namespace mpu6050
39 } // namespace esphome
void set_accel_y_sensor(sensor::Sensor *accel_y_sensor)
Definition: mpu6050.h:20
void set_gyro_x_sensor(sensor::Sensor *gyro_x_sensor)
Definition: mpu6050.h:23
sensor::Sensor * gyro_y_sensor_
Definition: mpu6050.h:33
sensor::Sensor * accel_z_sensor_
Definition: mpu6050.h:30
This class simplifies creating components that periodically check a state.
Definition: component.h:283
sensor::Sensor * accel_y_sensor_
Definition: mpu6050.h:29
sensor::Sensor * gyro_z_sensor_
Definition: mpu6050.h:34
void set_accel_z_sensor(sensor::Sensor *accel_z_sensor)
Definition: mpu6050.h:21
sensor::Sensor * temperature_sensor_
Definition: mpu6050.h:31
sensor::Sensor * accel_x_sensor_
Definition: mpu6050.h:28
void set_accel_x_sensor(sensor::Sensor *accel_x_sensor)
Definition: mpu6050.h:19
void set_temperature_sensor(sensor::Sensor *temperature_sensor)
Definition: mpu6050.h:22
float get_setup_priority() const override
Definition: mpu6050.cpp:144
void set_gyro_z_sensor(sensor::Sensor *gyro_z_sensor)
Definition: mpu6050.h:25
void set_gyro_y_sensor(sensor::Sensor *gyro_y_sensor)
Definition: mpu6050.h:24
sensor::Sensor * gyro_x_sensor_
Definition: mpu6050.h:32
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
Base-class for all sensors.
Definition: sensor.h:57
This Class provides the methods to read/write bytes from/to an i2c device.
Definition: i2c.h:133