From 9592d9edfa12c7febc1adeb1558ad764c9ccaeb4 Mon Sep 17 00:00:00 2001 From: Benjamin Vallet Date: Fri, 1 Apr 2022 10:30:27 +0200 Subject: [PATCH] added gyro with serialplotter at 115200 baud rate --- gyro/gyro.ino | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 gyro/gyro.ino diff --git a/gyro/gyro.ino b/gyro/gyro.ino new file mode 100644 index 0000000..d28c139 --- /dev/null +++ b/gyro/gyro.ino @@ -0,0 +1,23 @@ + +#include +#include + +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); +}