MPU6050 with Serial YAW Only not Work Work in Progress
Dependents: R1Arobo_Maika_B 2021Arobo_UMAPYOI 2021Arobo_YUMIPYOI
Serial6050.h
00001 #pragma once 00002 #include "mbed.h" 00003 00004 #define ERROR -10000 00005 00006 enum axis { 00007 YAW, 00008 PITCH, 00009 ROLL 00010 }; 00011 00012 class Serial6050 00013 { 00014 private: 00015 RawSerial serial; 00016 DigitalOut rst; 00017 int resetValue; 00018 int Bias; 00019 void intReceive(); 00020 bool useResetPin; 00021 public: 00022 Serial6050(PinName tx, PinName rx, PinName resetPin); 00023 void init(); 00024 void reset(); 00025 volatile uint8_t data; 00026 volatile int Deg; 00027 float read(); 00028 };
Generated on Thu Aug 18 2022 00:49:12 by
1.7.2