for textbook v4.4

Dependencies:   HEPTA_SENSOR mbed HEPTA_EPS

main.cpp

Committer:
HeptaSatTraining2019
Date:
2019-11-04
Revision:
30:9dd4ebe330f1
Parent:
27:980fc888f1de

File content as of revision 30:9dd4ebe330f1:

#include "mbed.h"
#include "HEPTA_EPS.h"
#include "HEPTA_SENSOR.h"
 
Serial pc(USBTX, USBRX);
HEPTA_EPS eps(p16,p26);
HEPTA_SENSOR sensor(p17, 
                    p28,p27,0xD0,0x18,
                    p13, p14,p25,p24);
 
int main()
{
    pc.baud(9600);
    float gx,gy,gz;
    pc.printf("Gyro Sensor Mode\r\n");
    for(int i = 0; i<50; i++) {
        sensor.sen_gyro(&gx,&gy,&gz);
        pc.printf("%f,%f,%f\r\n",gx,gy,gz);
        wait(1.0);
    }
}