Lab4

Dependencies:   HEPTA_SENSOR mbed HEPTA_EPS

Committer:
HeptaSatTraining2019
Date:
Wed Aug 21 20:56:24 2019 +0000
Revision:
25:c5fa5fc8320b
Parent:
24:3659e0c223c8
Child:
26:443ad6fe9ea4

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 0:bdbd3d6fc5d5 1 #include "mbed.h"
HeptaSatTraining2019 21:92c25e853b87 2 #include"HEPTA_EPS.h"
HeptaSatTraining2019 21:92c25e853b87 3 #include"HEPTA_SENSOR.h"
HeptaSatTraining2019 24:3659e0c223c8 4
HeptaSatTraining2019 25:c5fa5fc8320b 5 Serial pc(USBTX, USBRX);
HeptaSatTraining2019 25:c5fa5fc8320b 6 HEPTA_EPS eps(p16,p26);
HeptaSatTraining2019 25:c5fa5fc8320b 7 HEPTA_SENSOR sensor(p17,
HeptaSatTraining2019 25:c5fa5fc8320b 8 p28,p27,0xD0,0x18,
HeptaSatTraining2019 25:c5fa5fc8320b 9 p13, p14,p25,p24);
HeptaSatTraining2019 24:3659e0c223c8 10
umeume 2:1c5cdb2c3e0f 11 int main()
umeume 2:1c5cdb2c3e0f 12 {
HeptaSatTraining2019 24:3659e0c223c8 13 pc.baud(9600);
HeptaSatTraining2019 25:c5fa5fc8320b 14 float ax,ay,az;
HeptaSatTraining2019 25:c5fa5fc8320b 15 pc.printf("Accel Sensor Mode\r\n");
HeptaSatTraining2019 25:c5fa5fc8320b 16 for(int i = 0; i<50; i++) {
HeptaSatTraining2019 25:c5fa5fc8320b 17 sensor.sen_acc(&ax,&ay,&az);
HeptaSatTraining2019 25:c5fa5fc8320b 18 pc.printf("%f,%f,%f\r\n",ax,ay,az);
HeptaSatTraining2019 25:c5fa5fc8320b 19 wait(1.0);
HeptaSatTraining2019 24:3659e0c223c8 20 }
umeume 2:1c5cdb2c3e0f 21 }