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.
grove_compass_class.h@0:609518794a5d, 2015-06-09 (annotated)
- Committer:
- JackyZhangFromSeeed
- Date:
- Tue Jun 09 10:17:32 2015 +0000
- Revision:
- 0:609518794a5d
grove_compass
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| JackyZhangFromSeeed | 0:609518794a5d | 1 | |
| JackyZhangFromSeeed | 0:609518794a5d | 2 | |
| JackyZhangFromSeeed | 0:609518794a5d | 3 | |
| JackyZhangFromSeeed | 0:609518794a5d | 4 | #ifndef __GROVE_COMPASS_CLASS_H__ |
| JackyZhangFromSeeed | 0:609518794a5d | 5 | #define __GROVE_COMPASS_CLASS_H__ |
| JackyZhangFromSeeed | 0:609518794a5d | 6 | |
| JackyZhangFromSeeed | 0:609518794a5d | 7 | #include "grove_compass.h" |
| JackyZhangFromSeeed | 0:609518794a5d | 8 | |
| JackyZhangFromSeeed | 0:609518794a5d | 9 | //GROVE_NAME "Grove_Compass" |
| JackyZhangFromSeeed | 0:609518794a5d | 10 | //IF_TYPE I2C |
| JackyZhangFromSeeed | 0:609518794a5d | 11 | //IMAGE_URL http://www.seeedstudio.com/wiki/File:3_axis_compass.jpg |
| JackyZhangFromSeeed | 0:609518794a5d | 12 | |
| JackyZhangFromSeeed | 0:609518794a5d | 13 | class GroveCompass |
| JackyZhangFromSeeed | 0:609518794a5d | 14 | { |
| JackyZhangFromSeeed | 0:609518794a5d | 15 | public: |
| JackyZhangFromSeeed | 0:609518794a5d | 16 | GroveCompass(int pinsda, int pinscl); |
| JackyZhangFromSeeed | 0:609518794a5d | 17 | bool write_setup(void); |
| JackyZhangFromSeeed | 0:609518794a5d | 18 | bool read_compass_xyz(float *cx, float *cy, float *cz); |
| JackyZhangFromSeeed | 0:609518794a5d | 19 | bool read_compass_heading(float *heading); |
| JackyZhangFromSeeed | 0:609518794a5d | 20 | |
| JackyZhangFromSeeed | 0:609518794a5d | 21 | private: |
| JackyZhangFromSeeed | 0:609518794a5d | 22 | I2C_T *i2c; |
| JackyZhangFromSeeed | 0:609518794a5d | 23 | }; |
| JackyZhangFromSeeed | 0:609518794a5d | 24 | |
| JackyZhangFromSeeed | 0:609518794a5d | 25 | #endif |