23 lines
473 B
C++
23 lines
473 B
C++
#include"MeMCore.h"
|
|
#include <Wire.h>
|
|
MeGyro gyro;
|
|
|
|
void setup() {
|
|
// put your setup code here, to run once:
|
|
Serial.begin(115200);
|
|
gyro.begin();
|
|
}
|
|
|
|
void loop() {
|
|
// put your main code here, to run repeatedly:
|
|
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);
|
|
} |