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: CAN HTTPClient MODSERIAL MyThings Pyrn3GModem Socket TinyGPS MyUSBHost lwip-sys lwip mbed-rtos mbed-src
IMUSensor.h
00001 #ifndef IMU_SENSOR_H 00002 #define IMU_SENSOR_H 00003 00004 #include "mbed.h" 00005 #include "MySensor.h" 00006 #include "LSM303DLH.h" 00007 00008 #define IMU_STORE_SIZE 128 00009 00010 class IMUSensor: public MySensor { 00011 protected: 00012 uint16_t store[IMU_STORE_SIZE]; 00013 typedef struct _imuImpact{ 00014 int16_t ax; 00015 int16_t ay; 00016 int16_t az; 00017 int16_t mx; 00018 int16_t my; 00019 int16_t mz; 00020 } __attribute__((packed)) imuImpact; 00021 imuImpact impact; 00022 LSM303DLH Accelerometer; 00023 public: 00024 IMUSensor(PinName sda, PinName scl, uint32_t idle = 1000); 00025 virtual void InitResultsStatic(void); 00026 virtual void Loop(void); 00027 virtual void StoreLastImpact(void); 00028 }; 00029 00030 #endif // IMU_SENSOR_H
Generated on Wed Jul 13 2022 02:07:11 by
 1.7.2
 1.7.2