Skip to content

Instantly share code, notes, and snippets.

@esmarr58
Created November 11, 2017 01:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esmarr58/b92a880dbce51338ba19e2d13ecdb3f3 to your computer and use it in GitHub Desktop.
Save esmarr58/b92a880dbce51338ba19e2d13ecdb3f3 to your computer and use it in GitHub Desktop.
void setup(){
int error;
uint8_t c;
Serial.begin(9600);
Wire.begin();
error = MPU6050_read (MPU6050_WHO_AM_I, &c, 1);
error = MPU6050_read (MPU6050_PWR_MGMT_2, &c, 1);
MPU6050_write_reg (MPU6050_PWR_MGMT_1, 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment