Aaron Berk
/
CMPS03_HelloWorld
CMPS03 digital compass example.
Revision 0:83650aeac2b2, committed 2010-08-26
- Comitter:
- aberk
- Date:
- Thu Aug 26 11:05:49 2010 +0000
- Child:
- 1:3eeda0cce598
- Commit message:
- Version 1.0
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CMPS03_lib.lib Thu Aug 26 11:05:49 2010 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/aberk/programs/CMPS03_lib/latest \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Aug 26 11:05:49 2010 +0000 @@ -0,0 +1,18 @@ +#include "CMPS03.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); + + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Aug 26 11:05:49 2010 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/49a220cc26e0