Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
9dof.h
00001 #ifndef DOF9_RAZOR_IMU_H 00002 #define DOF9_RAZOR_IMU_H 00003 00004 //****************************************************************************/ 00005 // Includes 00006 //****************************************************************************/ 00007 #include "mbed.h" 00008 00009 //****************************************************************************/ 00010 // Defines 00011 //****************************************************************************/ 00012 00013 class dof9RazorImu { 00014 #define BAUD_RATE 38400 //Default in frimware from SparkFun. 00015 #define DOFFW 0// 1 PARA MODIFICADO 00016 public: 00017 00018 /** 00019 * Constructor. 00020 * 00021 * Parameters: 00022 * 00023 * tx - Pin to use for Serial transmission. 00024 * rx - Pin to use for Serial receive. 00025 */ 00026 dof9RazorImu(PinName tx, PinName rx); 00027 00028 /** 00029 * Update all of the heading data. 00030 */ 00031 void update(void); 00032 00033 int getGyroX(void); 00034 int getGyroY(void); 00035 int getGyroZ(void); 00036 00037 int getAccX(void); 00038 int getAccY(void); 00039 int getAccZ(void); 00040 00041 int getMagX(void); 00042 int getMagY(void); 00043 int getMagZ(void); 00044 00045 private: 00046 00047 Serial* razor; 00048 00049 int gyro_x; 00050 int gyro_y; 00051 int gyro_z; 00052 00053 int acc_x; 00054 int acc_y; 00055 int acc_z; 00056 00057 int mag_x; 00058 int mag_y; 00059 int mag_z; 00060 }; 00061 00062 #endif /* DOF9_RAZOR_IMU_H */
Generated on Thu Jul 14 2022 03:21:10 by
1.7.2