DECS @UNIST / Mbed 2 deprecated Anybaro_ver_7

Dependencies:   mbed

Committer:
Bhoney
Date:
Thu Aug 22 08:36:15 2019 +0000
Revision:
19:67584cb64b9c
Parent:
18:25281ee3a517
QUALIFYING_MODE is added (Qtimer, Qtime, Qflag, Qfunc for btn)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
whutsup 4:bf4ad2079096 1 #include "mbed.h"
whutsup 4:bf4ad2079096 2
whutsup 4:bf4ad2079096 3 AnalogIn force_R1(PC_2);
whutsup 4:bf4ad2079096 4 AnalogIn force_R2(PC_3);
whutsup 4:bf4ad2079096 5 AnalogIn force_R3(PC_4);
whutsup 4:bf4ad2079096 6 AnalogIn force_R4(PC_5);
whutsup 4:bf4ad2079096 7
whutsup 4:bf4ad2079096 8 extern Serial bt;
Bhoney 19:67584cb64b9c 9 //extern Serial pc;
whutsup 4:bf4ad2079096 10
whutsup 4:bf4ad2079096 11 float sum_L[4]={0,};
whutsup 4:bf4ad2079096 12 float sum_R[4]={0,};
whutsup 4:bf4ad2079096 13
whutsup 4:bf4ad2079096 14 float avg_L[4]={0,};
whutsup 4:bf4ad2079096 15 float avg_R[4]={0,};
whutsup 4:bf4ad2079096 16
Bhoney 19:67584cb64b9c 17 void ReadForce()
whutsup 4:bf4ad2079096 18 {
whutsup 4:bf4ad2079096 19
Bhoney 19:67584cb64b9c 20 int force_R[4];
whutsup 4:bf4ad2079096 21
Bhoney 18:25281ee3a517 22 force_R[0] = force_R1.read()*99;
Bhoney 18:25281ee3a517 23 force_R[1] = force_R2.read()*99;
Bhoney 18:25281ee3a517 24 force_R[2] = force_R3.read()*99;
Bhoney 18:25281ee3a517 25 force_R[3] = force_R4.read()*99;
Bhoney 18:25281ee3a517 26
Bhoney 18:25281ee3a517 27 bt.printf("<FOT%2d%2d%2d%2d>\n", force_R[0],
Bhoney 17:9a060d2daca8 28 force_R[1],
Bhoney 17:9a060d2daca8 29 force_R[2],
Bhoney 17:9a060d2daca8 30 force_R[3]);
whutsup 4:bf4ad2079096 31 }