HeptaSat

Dependencies:   HEPTA_EPS HEPTA_SENSOR mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "HEPTA_EPS.h"
00003 #include "HEPTA_SENSOR.h"
00004  
00005 RawSerial pc(USBTX,USBRX,9600);
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     float mx,my,mz;
00014     pc.printf("Magnetometer Mode\r\n");
00015     for(int i = 0; i<50; i++) {
00016         sensor.sen_mag(&mx,&my,&mz);
00017         pc.printf("mag : %f,%f,%f\r\n",mx,my,mz);
00018         wait(1.0);
00019     }
00020 }