BETA_A

Dependencies:   DataPool MD_PID mbed

Committer:
hirotayamato
Date:
Fri Sep 15 01:09:18 2017 +0000
Revision:
11:5365da759270
Parent:
9:feb86a283109
BETA_A

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hirotayamato 0:b8fa7a019f5d 1 #include "mbed.h"
hirotayamato 0:b8fa7a019f5d 2
hirotayamato 0:b8fa7a019f5d 3 #include "2017_3_h.h"
hirotayamato 0:b8fa7a019f5d 4
hirotayamato 2:cd4c1d0a4346 5 #include "BetaTransporter.h"
hirotayamato 0:b8fa7a019f5d 6 #include "DataPool.h"
hirotayamato 0:b8fa7a019f5d 7
hirotayamato 11:5365da759270 8 Omni_3 Omni(PB_4, PB_0, PA_12, PA_7, PB_5, PB_1, PA_6, PA_5, PA_11, PF_0, PA_4, PA_3, 1);
hirotayamato 0:b8fa7a019f5d 9 Serial pc(USBTX, USBRX);
hirotayamato 0:b8fa7a019f5d 10
hirotayamato 0:b8fa7a019f5d 11 int main() {
hirotayamato 2:cd4c1d0a4346 12 DataPool *beta;
hirotayamato 8:c2569e1c34d7 13
hirotayamato 2:cd4c1d0a4346 14 beta = new BetaTransporter;
hirotayamato 8:c2569e1c34d7 15
hirotayamato 0:b8fa7a019f5d 16 Omni.Drive(0, 0, 0);
hirotayamato 0:b8fa7a019f5d 17 float x, y, t;
hirotayamato 0:b8fa7a019f5d 18 while(1) {
hirotayamato 2:cd4c1d0a4346 19 beta->set();
hirotayamato 9:feb86a283109 20 x = beta->read(0) / 128.00;
hirotayamato 9:feb86a283109 21 y = beta->read(1) / 128.00;
hirotayamato 9:feb86a283109 22 t = beta->read(2) / 128.00;
hirotayamato 0:b8fa7a019f5d 23 Omni.Drive(x, y, t);
hirotayamato 11:5365da759270 24 wait(0.1);
hirotayamato 0:b8fa7a019f5d 25 }
hirotayamato 0:b8fa7a019f5d 26 }