Open BoldizarF opened 5 years ago
Sensor: MPU-6050 (Accelerometer + Gyro + Magnetometer + DMP) Library: https://playground.arduino.cc/Main/MPU-6050 Address: 0x68 (I2C)
Pins: VCC - 5V GND - GND SCL - Serial clock line SDA - Serial data line XDA (AUX_DA) - Not tested (advanced) XCL (AUX_CL) - Not tested (advanced) ADO - Not tested (advanced) INT - Not tested (advanced)
Registers: 0x3B/3C - Accelerometer X 0x3D/3E - Accelerometer Y 0x3F/40 - Accelerometer Z 0x41/42 - Temperature 0x43/44 - Gyro X 0x45/46 - Gyro Y 0x47/48 - Gyro Z 0x6B - Wakeup (value:0)
Ah, you are considering the mighty MPU6050 I see!
Unless you want to work with the raw values and infer the tilt of the car or something, or create your own algorithm to calculate the car's orientation (don't...), I would look into this sketch which uses the digital motion processor on the MPU6050 itself so to get the absolute orientation from the beginning of the measurement.
Alternatively, you could use the GY-50 gyroscope that can be found (it's detachable as well) on the shield that I left with you.
I2C Scanner: