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@2:cd4c1d0a4346, 2017-08-25 (annotated)
- Committer:
- hirotayamato
- Date:
- Fri Aug 25 07:43:15 2017 +0000
- Revision:
- 2:cd4c1d0a4346
- Parent:
- 0:b8fa7a019f5d
- Child:
- 3:15f75374bff5
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 | 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 | 2:cd4c1d0a4346 | 12 | DataPool *beta; |
| hirotayamato | 0:b8fa7a019f5d | 13 | |
| hirotayamato | 2:cd4c1d0a4346 | 14 | beta = new BetaTransporter; |
| 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 | 2:cd4c1d0a4346 | 19 | beta->set(); |
| hirotayamato | 2:cd4c1d0a4346 | 20 | x = beta->read(0); |
| hirotayamato | 2:cd4c1d0a4346 | 21 | y = beta->read(1); |
| hirotayamato | 2:cd4c1d0a4346 | 22 | t = beta->read(2); |
| hirotayamato | 0:b8fa7a019f5d | 23 | Omni.Drive(x, y, t); |
| hirotayamato | 0:b8fa7a019f5d | 24 | } |
| hirotayamato | 0:b8fa7a019f5d | 25 | } |