Serial.print(" | Tmp = ") Serial.print(Tmp/340.00+36.53) //equation for temperature in degrees C from datasheet Serial.print(" | AcZ = ") Serial.print(AcZ) Serial.print(" | AcY = ") Serial.print(AcY) Serial.print("AcX = ") Serial.print(AcX) Wire.write(0x3B) // starting with register 0x3B (ACCEL_XOUT_H) InitialError = Wire.endTransmission(true) Wire.write(0) // set to zero (wakes up the MPU-6050) #includeĬonst int MPU_addr=0圆8 // I2C address of the MPU-6050 The function in question only has 4 possible return values and 7 isn't one of them. What's odd is when I trace through the Wire library I find that there is no error code 7 defined. But for ever call after that I receive error code 7. On the very first call to initialize the MPU I receive a success error code. I'm using the code that is available on the Arduino web site with a slight variation I'm checking the error code on endTransmission and am printing it (I started to do this because I was getting all zero values back from my calls to read the MPU registers). I'm using an ESP32 to try to read from an IMU, the MPU-6050.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |