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.
Dependencies: mbed HMC5883L_kai_3
main.cpp
- Committer:
- TUATBM
- Date:
- 2019-02-06
- Revision:
- 0:26409a44f1f3
- Child:
- 1:c91577293e84
File content as of revision 0:26409a44f1f3:
#include "mbed.h"
#include "HMC5883L.h"
HMC5883L compass(PB_9, PB_8);
int main(){
int16_t a[3];
double b;
while(1){
compass.init();
b= compass.getHeadingXYDeg(0,-150);
printf("%lf\r\n",b);
wait(1);
}
/*while(1){
compass.getXYZ(a);
printf("%d, %d, %d,\r\n",a[0],a[2]-150,a[1]);
wait(1);}
*/
}