BETA_A
Dependencies: DataPool MD_PID mbed
main.cpp@10:123f2ce59545, 2017-09-14 (annotated)
- Committer:
- hirotayamato
- Date:
- Thu Sep 14 05:53:41 2017 +0000
- Revision:
- 10:123f2ce59545
- Parent:
- 9:feb86a283109
- Child:
- 11:5365da759270
BETA_A
Who changed what in which revision?
User | Revision | Line number | New 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 | 3:15f75374bff5 | 8 | Omni_3 Omni(PB_4, PB_0, PA_7, PA_2, PB_5, PB_1, PA_5, PA_6, 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 | 0:b8fa7a019f5d | 24 | } |
hirotayamato | 0:b8fa7a019f5d | 25 | } |