Hepta 9axis Sensor(Gyroscope)

Dependencies:   mbed HeptaBattery Hepta9axis

Fork of Lab7-01_template by HEPTA-Sat Training 2017~2018

main.cpp

Committer:
HEPTA
Date:
2017-09-07
Revision:
14:ebe9ec72b3e2
Parent:
13:a1fa75a002f6
Child:
15:1d9772c3fe72

File content as of revision 14:ebe9ec72b3e2:

#include "mbed.h"
#include "Hepta9axis.h"

Serial pc(USBTX,USBRX);
Hepta9axis n_axis(p28,p27,0xD0,0x18);

int main()
{
    pc.baud(9600);
    float gx,gy,gz;
    pc.printf("Gyro Sensor Mode\r\n");
    for(int i = 0; i<50; i++) {
        n_axis.sen_gyro(&gx,&gy,&gz);
        pc.printf("%f,%f,%f\r\n",gx,gy,gz);
        wait(1.0);
    }
}