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.
Dependencies: BNO055_fusion mbed
Diff: LOCALIZE.h
- Revision:
- 0:96d6eb224379
- Child:
- 1:8966a48ce8d5
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/LOCALIZE.h Tue Mar 01 18:20:45 2016 +0000
@@ -0,0 +1,34 @@
+#ifndef LOCALIZE_H
+#define LOCALIZE_H
+
+#include "mbed.h"
+#include "BNO055.h"
+
+#define ERROR_IMU -1
+
+typedef struct {
+ int x;
+ int y;
+ int a;
+}LOCALIZE_xya;
+
+class LOCALIZE
+{
+public:
+ LOCALIZE(I2C& y_i2c, I2C& x_imu_i2c, PinName imu_reset);
+ int init(void);
+ void get_angle(LOCALIZE_xya *xya);
+
+protected:
+ I2C _y_i2c;
+ I2C _x_imu_i2c;
+ PinName _imu_reset;
+ BNO055 _imu;
+ BNO055_ID_INF_TypeDef bno055_id_inf;
+ BNO055_EULER_TypeDef euler;
+ BNO055_GRAVITY_TypeDef gravity;
+ BNO055_LIN_ACC_TypeDef accel;
+
+};
+
+#endif //LOCALIZE_H
\ No newline at end of file