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: HEPTA_SENSOR mbed HEPTA_EPS
main.cpp
00001 #include "mbed.h" 00002 #include "HEPTA_EPS.h" 00003 #include "HEPTA_SENSOR.h" 00004 00005 Serial pc(USBTX, USBRX); 00006 HEPTA_EPS eps(p16,p26); 00007 HEPTA_SENSOR sensor(p17, 00008 p28,p27,0x19,0x69,0x13, 00009 p13,p14,p25,p24); 00010 00011 int main() 00012 { 00013 pc.baud(9600); 00014 float mx,my,mz; 00015 pc.printf("Magnetometer Mode\r\n"); 00016 for(int i = 0; i<50; i++) { 00017 sensor.sen_mag(&mx,&my,&mz); 00018 pc.printf("%f,%f,%f\r\n",mx,my,mz); 00019 wait(1.0); 00020 } 00021 }
Generated on Wed Sep 14 2022 13:23:51 by
1.7.2