Notifications
Clear all
Electronic Components & Theory
2
Posts
1
Users
0
Reactions
45.7 K
Views
Topic starter
2019-07-14 10:52 pm
Continuing understand of MPU 6050 here.
This message was approved by Recycled.Roadkill. May it find you in good health and humor.
Topic starter
2019-07-15 11:02 pm
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 6 years ago by Recycled Roadkill
This message was approved by Recycled.Roadkill. May it find you in good health and humor.