航空研究会 / Mbed 2 deprecated HMC5883L_kai_4

Dependencies:   mbed HMC5883L_kai_3

main.cpp

Committer:
taknokolat
Date:
2019-11-15
Revision:
2:2ce6c35efc65
Parent:
1:c91577293e84
Child:
3:8b34748c199c

File content as of revision 2:2ce6c35efc65:

#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(-152,286);
       printf("%lf\r\n",b);
       
      // wait(0.);
       }
       
   /*while(1){
   compass.getXYZ(a);
   //printf("%d, %d, %d,\r\n",a[0],a[2]-150,a[1]);
   printf("%d, %d\r\n",a[0]+20,a[2]+50);
   //wait(1);}

  
    }*/
}