Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: DataPool MD_PID mbed
main.cpp@0:b8fa7a019f5d, 2017-08-25 (annotated)
- Committer:
- hirotayamato
- Date:
- Fri Aug 25 05:10:49 2017 +0000
- Revision:
- 0:b8fa7a019f5d
- Child:
- 2:cd4c1d0a4346
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 | 0:b8fa7a019f5d | 5 | #include "GammaTransporter.h" |
| hirotayamato | 0:b8fa7a019f5d | 6 | #include "DataPool.h" |
| hirotayamato | 0:b8fa7a019f5d | 7 | |
| hirotayamato | 0:b8fa7a019f5d | 8 | Omni_3 Omni(PB_0, PB_4, PA_7, PA_2, PF_0, PA_11, PA_5, PA_6, PB_1, PB_5, PA_4, PA_3, 1); |
| hirotayamato | 0:b8fa7a019f5d | 9 | Serial pc(USBTX, USBRX); |
| hirotayamato | 0:b8fa7a019f5d | 10 | |
| hirotayamato | 0:b8fa7a019f5d | 11 | int main() { |
| hirotayamato | 0:b8fa7a019f5d | 12 | DataPool *gamma; |
| hirotayamato | 0:b8fa7a019f5d | 13 | |
| hirotayamato | 0:b8fa7a019f5d | 14 | gamma = new GammaTransporter; |
| hirotayamato | 0:b8fa7a019f5d | 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 | 0:b8fa7a019f5d | 19 | gamma->set(); |
| hirotayamato | 0:b8fa7a019f5d | 20 | x = gamma->read(0); |
| hirotayamato | 0:b8fa7a019f5d | 21 | y = gamma->read(1); |
| hirotayamato | 0:b8fa7a019f5d | 22 | t = gamma->read(2); |
| hirotayamato | 0:b8fa7a019f5d | 23 | Omni.Drive(x, y, t); |
| hirotayamato | 0:b8fa7a019f5d | 24 | } |
| hirotayamato | 0:b8fa7a019f5d | 25 | } |