Add MPU6886 docs (#1933)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Fabian Affolter 2022-02-21 00:23:30 +01:00 committed by GitHub
parent db83463e0c
commit cfbd29050f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 78 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

View File

@ -0,0 +1,77 @@
MPU6886 Accelerometer/Gyroscope Sensor
======================================
.. seo::
:description: Instructions for setting up MPU6886 Accelerometer and Gyroscope sensors.
:image: mpu6886.jpg
The ``mpu6886`` sensor platform allows you to use your MPU6886 Accelerometer/Gyroscope
(`datasheet <https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/MPU-6886-000193%2Bv1.1_GHIC_en.pdf>`__,
`M5Stack`_) sensors with
ESPHome. 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.
The MPU6886 is built-in in various M5Stack units (e.g., M5Stick C, ATOM Matrix or M5Stack Core2).
.. _M5Stack: https://docs.m5stack.com/en/unit/imu
.. figure:: images/mpu6886-ui.png
:align: center
:width: 80.0%
.. code-block:: yaml
# Example configuration entry
sensor:
- platform: mpu6886
address: 0x68
accel_x:
name: "MPU6886 Accel X"
accel_y:
name: "MPU6886 Accel Y"
accel_z:
name: "MPU6886 Accel z"
gyro_x:
name: "MPU6886 Gyro X"
gyro_y:
name: "MPU6886 Gyro Y"
gyro_z:
name: "MPU6886 Gyro z"
temperature:
name: "MPU6886 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>`.
- **accel_y** (*Optional*): Use the Y-Axis of the Accelerometer. All options from
:ref:`Sensor <config-sensor>`.
- **accel_z** (*Optional*): Use the Z-Axis of the Accelerometer. All options from
:ref:`Sensor <config-sensor>`.
- **gyro_x** (*Optional*): Use the X-Axis of the Gyroscope. All options from
:ref:`Sensor <config-sensor>`.
- **gyro_y** (*Optional*): Use the Y-Axis of the Gyroscope. All options from
:ref:`Sensor <config-sensor>`.
- **gyro_z** (*Optional*): Use the Z-Axis of the Gyroscope. All options from
:ref:`Sensor <config-sensor>`.
- **temperature** (*Optional*): Use the internal temperature of the sensor. All options from
:ref:`Sensor <config-sensor>`.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
See Also
--------
- :ref:`sensor-filters`
- :doc:`template`
- :apiref:`mpu6886/mpu6886.h`
- `i2cdevlib <https://github.com/jrowberg/i2cdevlib>`__ by `Jeff Rowberg <https://github.com/jrowberg>`__
- :ghedit:`Edit`

BIN
images/mpu6886.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@ -359,6 +359,7 @@ Motion
APDS9960, components/sensor/apds9960, apds9960.jpg, Colour & Gesture
MPU6050, components/sensor/mpu6050, mpu6050.jpg, Accelerometer & Gyroscope
MPU6886, components/sensor/mpu6886, mpu6886.jpg, Accelerometer & Gyroscope
RuuviTag, components/sensor/ruuvitag, ruuvitag.jpg, Temperature & Humidity & Accelerometer