
CMPS03 digital compass example.
main.cpp
- Committer:
- aberk
- Date:
- 2010-11-27
- Revision:
- 1:3eeda0cce598
- Parent:
- 0:83650aeac2b2
File content as of revision 1:3eeda0cce598:
#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); } }