A library to read from an Epson IMU
USBIMU.h
- Committer:
- GijsB
- Date:
- 2013-12-13
- Revision:
- 1:a2b5b17c949d
File content as of revision 1:a2b5b17c949d:
#ifndef USBIMU_H #define USBIMU_H #include "mbed.h" #include "USBHostSerial.h" #define TEMP_OUT 0x02 #define XGYRO_OUT 0x04 #define YGYRO_OUT 0x06 #define ZGYRO_OUT 0x08 #define XACCL_OUT 0x0A #define YACCL_OUT 0x0C #define ZACCL_OUT 0x0E #define CR 0x0D class USBIMU { public: USBIMU(); ~USBIMU(); signed int getParam(unsigned char par); float getScaledParam(unsigned char par); bool getFaulty(); private: USBHostSerial *s_; bool faulty; void init(USBHostSerial *s); bool isReady(); bool isFaulty(); void goToStartOfSentence(unsigned char par); }; #endif