Created
December 10, 2013 20:41
Revisions
-
turbinenreiter created this gist
Dec 10, 2013 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ #include <MPU6050.h> #include <I2Cdev.h> #include <Wire.h> MPU6050 accelgyro; int ax, ay, az; int gx, gy, gz; int led = 13; // the setup routine runs once when you press reset: void setup() { // initialize serial communication at 9600 bits per second: Serial.begin(9600); Wire.begin(); accelgyro.initialize(); pinMode(led, OUTPUT); digitalWrite(led, HIGH); accelgyro.setFullScaleAccelRange(1); } // the loop routine runs over and over again forever: void loop() { accelgyro.getMotion6(&ax, &ay, &az, &gx, &gy, &gz); Serial.println(ax); delay(50); }