Notifications
Clear all

Part II >>>MPU 6050 Breakout Board ???

2 Posts
1 Users
0 Likes
45.5 K Views
Recycled Roadkill
(@recycled-roadkill)
Member
Joined: 5 years ago
Posts: 75
Topic starter  

Continuing understand of MPU 6050 here.

 

This message was approved by Recycled.Roadkill. May it find you in good health and humor.


   
Quote
Recycled Roadkill
(@recycled-roadkill)
Member
Joined: 5 years ago
Posts: 75
Topic starter  

 

image

 

image

The above graph are a result of the code created by Mandy and posted below. I've studied the code to the absolute best of my ability (which isn't much)  but I see nothing that identifies the placement of one line on the graph from another. I believe 4 lines are crammed around line 0,0 however difficult to tell from the pic here.

#include <Wire.h>

void setup() {
// put your setup code here, to run once:
Wire.begin();
Serial.begin(9600);
Wire.beginTransmission(0x68);
Wire.write(0x6B);
Wire.write(0x00);
Wire.endTransmission();
}

void loop() {
// put your main code here, to run repeatedly:
Wire.beginTransmission(0x68);
Wire.write(0x43);
Wire.endTransmission();
Wire.requestFrom(0x68, 14, true);
while(Wire.available() < 14);
acc_x = Wire.read()<<8|Wire.read();
acc_y = Wire.read()<<8|Wire.read();
acc_z = Wire.read()<<8|Wire.read();
temp = Wire.read()<<8|Wire.read();
gyro_x = Wire.read()<<8|Wire.read();
gyro_y = Wire.read()<<8|Wire.read();
gyro_z = Wire.read()<<8|Wire.read();

// only display the gyro.
Serial.print(gyro_x);
Serial.print(",");
Serial.print(gyro_y);
Serial.print(",");
Serial.println(gyro_z);
}

So please help me?
This post was modified 5 years ago by Recycled Roadkill

This message was approved by Recycled.Roadkill. May it find you in good health and humor.


   
ReplyQuote