HEPTA-Sat Training 2022 / Mbed 2 deprecated Lab4-05_detect_angular_velocity

Dependencies:   HEPTA_EPS HEPTA_SENSOR mbed

main.cpp

Committer:
csmk18112
Date:
2022-08-19
Revision:
3:025a6d59cb26
Parent:
2:754e17dc25a5
Child:
4:b04a41b80fc5

File content as of revision 3:025a6d59cb26:

#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,0x19,0x69,0x13,
                  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("gyro: %f,%f,%f\r\n",gx,gy,gz);
        wait(1.0);
    }
}