GY-521 with arduino and Processing

preview_player
Показать описание
The source code I use to test the GY-521 (MPU-6050) module is here:
Also I have added one line of code in Processing demo project to avoid non regular rectangular (which was case at my testing) in draw method right after distance and x_rotation integer value and above gyro drawing;
void draw() {

background(0);

// Tweak the view of the rectangles
int distance = 50;
int x_rotation = 90;

noStroke();
//Show gyro data
pushMatrix();
translate(width/6, height/2, -50);
rotateX(radians(-x_gyr - x_rotation));
rotateY(radians(-y_gyr));
draw_rect(249, 250, 50);
...............................

Thanks for watching.
Рекомендации по теме
Комментарии
Автор

Hi, compliments for your gyroscope test! can you provide a sketch? Are you using DCM processing to transform raw values into angles? Thankyou!

aldoskyz
join shbcf.ru