GAMMA_A

Dependencies:   DataPool MD_PID mbed

Committer:
hirotayamato
Date:
Thu Sep 07 00:44:41 2017 +0000
Revision:
6:4bc7c61f190a
Parent:
3:7fa748b4990d
Child:
7:5ea1597ab7fb
GAMMA_A

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hirotayamato 0:6ed41770a6b7 1 #include "mbed.h"
hirotayamato 0:6ed41770a6b7 2
hirotayamato 0:6ed41770a6b7 3 #include "2017_3_b.h"
hirotayamato 0:6ed41770a6b7 4
hirotayamato 0:6ed41770a6b7 5 #include "GammaTransporter.h"
hirotayamato 0:6ed41770a6b7 6 #include "DataPool.h"
hirotayamato 0:6ed41770a6b7 7
hirotayamato 3:7fa748b4990d 8 Omni_3 Omni(PB_4, PB_1, PA_2, PA_7, PA_11, PA_8, PA_4, PA_3, PB_5, PF_0, PA_6, PA_5, 1);
hirotayamato 0:6ed41770a6b7 9 Serial pc(USBTX, USBRX);
hirotayamato 0:6ed41770a6b7 10
hirotayamato 0:6ed41770a6b7 11 int main() {
hirotayamato 0:6ed41770a6b7 12 DataPool *gamma;
hirotayamato 2:158fea945e51 13
hirotayamato 0:6ed41770a6b7 14 gamma = new GammaTransporter;
hirotayamato 2:158fea945e51 15
hirotayamato 0:6ed41770a6b7 16 Omni.Drive(0, 0, 0);
hirotayamato 0:6ed41770a6b7 17 float x, y, t;
hirotayamato 0:6ed41770a6b7 18 while(1) {
hirotayamato 0:6ed41770a6b7 19 gamma->set();
hirotayamato 6:4bc7c61f190a 20 x = gamma->read(0) / 128;
hirotayamato 6:4bc7c61f190a 21 y = gamma->read(1) / 128;
hirotayamato 6:4bc7c61f190a 22 t = gamma->read(2) / 128;
hirotayamato 0:6ed41770a6b7 23 Omni.Drive(x, y, t);
hirotayamato 0:6ed41770a6b7 24 }
hirotayamato 2:158fea945e51 25 }