added gyro with serialplotter at 115200 baud rate

This commit is contained in:
Benjamin VALLET 2022-04-01 10:30:27 +02:00
parent 7d7dad408f
commit 9592d9edfa
1 changed files with 23 additions and 0 deletions

23
gyro/gyro.ino Normal file
View File

@ -0,0 +1,23 @@
#include <MeMCore.h>
#include <Wire.h>
MeGyro gyro;
void setup()
{
Serial.begin(115200);
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() );
delay(10);
}