gyro
This commit is contained in:
parent
9019f5145e
commit
c2bae1431c
|
|
@ -0,0 +1,23 @@
|
|||
#include"MeMCore.h"
|
||||
#include <Wire.h>
|
||||
MeGyro gyro;
|
||||
|
||||
void setup() {
|
||||
Serial.begin(9600);
|
||||
gyro.begin();
|
||||
|
||||
}
|
||||
|
||||
void loop() {
|
||||
gyro.update();
|
||||
Serial.read();
|
||||
Serial.print("X:");
|
||||
Serial.print(gyro.getAngleX());
|
||||
Serial.print(" Y:");
|
||||
Serial.print(gyro.getAngleY() );
|
||||
Serial.print(" Z:");
|
||||
Serial.println(gyro.getAngleZ() );
|
||||
Serial.println(gyro.getGyroY());
|
||||
delay(10);
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue