1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-03 11:52:20 +01:00

[MPU6050] Support devices with WHOAMI 0x98 (#3784)

This commit is contained in:
Carlos Garcia Saura
2022-09-12 00:32:07 +02:00
committed by GitHub
parent 9a5f865eea
commit be473b97c4

View File

@@ -23,7 +23,7 @@ const float GRAVITY_EARTH = 9.80665f;
void MPU6050Component::setup() {
ESP_LOGCONFIG(TAG, "Setting up MPU6050...");
uint8_t who_am_i;
if (!this->read_byte(MPU6050_REGISTER_WHO_AM_I, &who_am_i) || who_am_i != 0x68) {
if (!this->read_byte(MPU6050_REGISTER_WHO_AM_I, &who_am_i) || (who_am_i != 0x68 && who_am_i != 0x98)) {
this->mark_failed();
return;
}