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.
Fork of IEEE_14_Freescale by
gyroReader.h
- Committer:
- soonerbot
- Date:
- 2013-11-17
- Revision:
- 4:adc885f4ab75
- Parent:
- 1:c28fac16a109
- Child:
- 7:3b2cf7efe5d1
File content as of revision 4:adc885f4ab75:
/* * File: gyroReader.h * Author: Shawn Swatek * Originated: Spring 2013 * Revised: 3/29/13 */ #ifndef __GYROREADER__ #define __GYROREADER__ #include "mbed.h" //#include "rtos.h" #include "dbgprint.h" class gyroReader{ private: I2C accel; int gyroZcount; int gyroXcount; int zcal; int xcal; int polls; Ticker gyroUpkeepTicker; int startAccel(); float checkAccel(); int checkGyro(int& xacc, int& yacc, int& zacc); public: int xmag,ymag,zmag; float checkCompass(); void gyroUpkeep(); gyroReader(PinName pinA, PinName pinB); void setLevel(); void resetZ(); int getZ(); double getZDegrees(); int getX(); int getPolls(){ return polls;} int compZ(int compVal); void reset(); void calibrate(); }; #endif