Project group 3
/
mbed_cmp
The compass part
Fork of mbed_cmp by
main.cpp
- Committer:
- gegjackson
- Date:
- 2016-02-29
- Revision:
- 0:2f8627e2b4c7
- Child:
- 1:5b42fa6e0a73
File content as of revision 0:2f8627e2b4c7:
#include "CMPS03.h" #include "mbed.h" CMPS03 compass(p9, p10, CMPS03_DEFAULT_I2C_ADDRESS); Serial pc(USBTX, USBRX); int main() { pc.printf("Starting CMPS03 test...\n"); while(1){ wait(0.1); pc.printf("Bearing is: %f\n", compass.readBearing() / 10.0); } }