mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	Add support for new clones of mpu6050 responding with 0x70 address (#4546)
Co-authored-by: jakehdk <Jake@Jakobs-MacBook-Pro.local>
This commit is contained in:
		| @@ -23,7 +23,8 @@ const float GRAVITY_EARTH = 9.80665f; | |||||||
| void MPU6050Component::setup() { | void MPU6050Component::setup() { | ||||||
|   ESP_LOGCONFIG(TAG, "Setting up MPU6050..."); |   ESP_LOGCONFIG(TAG, "Setting up MPU6050..."); | ||||||
|   uint8_t who_am_i; |   uint8_t who_am_i; | ||||||
|   if (!this->read_byte(MPU6050_REGISTER_WHO_AM_I, &who_am_i) || (who_am_i != 0x68 && who_am_i != 0x98)) { |   if (!this->read_byte(MPU6050_REGISTER_WHO_AM_I, &who_am_i) || | ||||||
|  |       (who_am_i != 0x68 && who_am_i != 0x70 && who_am_i != 0x98)) { | ||||||
|     this->mark_failed(); |     this->mark_failed(); | ||||||
|     return; |     return; | ||||||
|   } |   } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user