ALPHA_A

Dependencies:   DataPool MD_PID mbed

Committer:
hirotayamato
Date:
Wed Aug 30 05:23:13 2017 +0000
Revision:
0:e77e7d7bbae0
Child:
1:3082e5f990cd
ALPHA_A

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hirotayamato 0:e77e7d7bbae0 1 #include "mbed.h"
hirotayamato 0:e77e7d7bbae0 2
hirotayamato 0:e77e7d7bbae0 3 #include "2017_4.h"
hirotayamato 0:e77e7d7bbae0 4
hirotayamato 0:e77e7d7bbae0 5 #include "AlphaTransporter.h"
hirotayamato 0:e77e7d7bbae0 6 #include "DataPool.h"
hirotayamato 0:e77e7d7bbae0 7
hirotayamato 0:e77e7d7bbae0 8 Mekanamu_4 Mekanamu(PA_8, PB_0, PA_2, PA_7, PA_11, PB_1, PA_6, PA_5, PB_5, PF_0, PA_4, PA_3, PB_4, PF_1, PA_1, PA_0, 1);
hirotayamato 0:e77e7d7bbae0 9 Serial pc(USBTX, USBRX);
hirotayamato 0:e77e7d7bbae0 10
hirotayamato 0:e77e7d7bbae0 11 int main() {
hirotayamato 0:e77e7d7bbae0 12 DataPool *alpha;
hirotayamato 0:e77e7d7bbae0 13
hirotayamato 0:e77e7d7bbae0 14 alpha = new AlphaTransporter;
hirotayamato 0:e77e7d7bbae0 15
hirotayamato 0:e77e7d7bbae0 16 Mekanamu.Drive(0, 0, 0);
hirotayamato 0:e77e7d7bbae0 17 float x, y, t;
hirotayamato 0:e77e7d7bbae0 18 while(1) {
hirotayamato 0:e77e7d7bbae0 19 alpha->set();
hirotayamato 0:e77e7d7bbae0 20 x = alpha->read(0);
hirotayamato 0:e77e7d7bbae0 21 y = alpha->read(1);
hirotayamato 0:e77e7d7bbae0 22 t = alpha->read(2);
hirotayamato 0:e77e7d7bbae0 23 Mekanamu.Drive(x, y, t);
hirotayamato 0:e77e7d7bbae0 24 }
hirotayamato 0:e77e7d7bbae0 25 }