This program is prototype for getting direction.
Dependencies: mbed
Fork of groundsensor by
main.cpp
- Committer:
- 394
- Date:
- 2018-10-19
- Revision:
- 1:9471418ea8d7
- Parent:
- 0:a7b4276743ef
File content as of revision 1:9471418ea8d7:
#include "mbed.h" #include "HMC5883L.h" Serial pc(USBTX, USBRX); HMC5883L compass(p28, p27); int main() { compass.init(); while(1) { pc.printf("raw=%f\r\n",compass.getHeadingXYDeg()); /*度数法で表記*/ wait(0.2); } }