mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-11-04 09:10:02 +01:00
79 lines
3.2 KiB
ReStructuredText
79 lines
3.2 KiB
ReStructuredText
MPU6050 Accelerometer/Gyroscope Sensor
|
|
======================================
|
|
|
|
The MPU6050 Accelerometer/Gyroscope sensor allows you to use your MPU6050
|
|
(`datasheet <https://www.invensense.com/wp-content/uploads/2015/02/MPU-6000-Datasheet1.pdf>`__,
|
|
`Sparkfun`_) sensors with
|
|
esphomelib. The :ref:`I²C Bus <i2c>` is
|
|
required to be set up in your configuration for this sensor to work.
|
|
|
|
This component only does some basic filtering and no calibration. Due to the complexity of
|
|
this sensor and the amount of possible configuration options, you should probably
|
|
create a custom component by copying and modifying the existing code if you want a specific
|
|
new feature. Supporting all possible use-cases would be quite hard.
|
|
|
|
|
|
.. figure:: images/mpu6050-full.jpg
|
|
:align: center
|
|
:width: 50.0%
|
|
|
|
MPU6050 Accelerometer/Gyroscope Sensor.
|
|
|
|
.. _Sparkfun: https://www.sparkfun.com/products/11028
|
|
|
|
.. figure:: images/mpu6050-ui.png
|
|
:align: center
|
|
:width: 80.0%
|
|
|
|
.. code:: yaml
|
|
|
|
# Example configuration entry
|
|
sensor:
|
|
- platform: mpu6050
|
|
address: 0x68
|
|
accel_x:
|
|
name: "MPU6050 Accel X"
|
|
accel_y:
|
|
name: "MPU6050 Accel Y"
|
|
accel_z:
|
|
name: "MPU6050 Accel z"
|
|
gyro_x:
|
|
name: "MPU6050 Gyro X"
|
|
gyro_y:
|
|
name: "MPU6050 Gyro Y"
|
|
gyro_z:
|
|
name: "MPU6050 Gyro z"
|
|
temperature:
|
|
name: "MPU6050 Temperature"
|
|
|
|
Configuration variables:
|
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
- **address** (*Optional*, int): Manually specify the i^2c address of the sensor. Defaults to ``0x68``.
|
|
- **accel_x** (*Optional*): Use the X-Axis of the Accelerometer. All options from
|
|
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
|
|
- **accel_y** (*Optional*): Use the Y-Axis of the Accelerometer. All options from
|
|
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
|
|
- **accel_z** (*Optional*): Use the Z-Axis of the Accelerometer. All options from
|
|
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
|
|
- **gyro_x** (*Optional*): Use the X-Axis of the Gyroscope. All options from
|
|
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
|
|
- **gyro_y** (*Optional*): Use the Y-Axis of the Gyroscope. All options from
|
|
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
|
|
- **gyro_z** (*Optional*): Use the Z-Axis of the Gyroscope. All options from
|
|
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
|
|
- **temperature** (*Optional*): Use the internal temperature of the sensor. All options from
|
|
:ref:`Sensor <config-sensor>` and :ref:`MQTT Component <config-mqtt-component>`.
|
|
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``15s``.
|
|
See :ref:`sensor-default_filter`.
|
|
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
|
|
|
See Also
|
|
^^^^^^^^
|
|
|
|
- :ref:`sensor-filters`
|
|
- :doc:`template`
|
|
- :doc:`ultrasonic`
|
|
- :doc:`API Reference </api/sensor/mpu6050>`
|
|
- `Edit this page on GitHub <https://github.com/OttoWinter/esphomedocs/blob/master/esphomeyaml/components/sensor/mpu6050.rst>`__
|