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: mbed
main.cpp@0:1e1b89f64b66, 2016-05-27 (annotated)
- Committer:
- Nthu_Five
- Date:
- Fri May 27 01:34:57 2016 +0000
- Revision:
- 0:1e1b89f64b66
- Child:
- 1:fa858ba076b3
0527 9:34
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Nthu_Five | 0:1e1b89f64b66 | 1 | |
| Nthu_Five | 0:1e1b89f64b66 | 2 | #include "mbed.h" |
| Nthu_Five | 0:1e1b89f64b66 | 3 | #include "Define.h" |
| Nthu_Five | 0:1e1b89f64b66 | 4 | |
| Nthu_Five | 0:1e1b89f64b66 | 5 | //////////////////////////////Init |
| Nthu_Five | 0:1e1b89f64b66 | 6 | |
| Nthu_Five | 0:1e1b89f64b66 | 7 | Serial pc(SERIAL_TX, SERIAL_RX); |
| Nthu_Five | 0:1e1b89f64b66 | 8 | |
| Nthu_Five | 0:1e1b89f64b66 | 9 | |
| Nthu_Five | 0:1e1b89f64b66 | 10 | |
| Nthu_Five | 0:1e1b89f64b66 | 11 | ////////////////////////////////////////////////////////////////////// |
| Nthu_Five | 0:1e1b89f64b66 | 12 | |
| Nthu_Five | 0:1e1b89f64b66 | 13 | |
| Nthu_Five | 0:1e1b89f64b66 | 14 | /////////////////////////////globle |
| Nthu_Five | 0:1e1b89f64b66 | 15 | double NowCoordinate[2]; |
| Nthu_Five | 0:1e1b89f64b66 | 16 | double NowFaceAngle, NowDirectionInRad; |
| Nthu_Five | 0:1e1b89f64b66 | 17 | long SelfRotation; |
| Nthu_Five | 0:1e1b89f64b66 | 18 | double TargetCoordinate[2]; |
| Nthu_Five | 0:1e1b89f64b66 | 19 | double Goal_1_Coordinate[2], Goal_2_Coordinate[2], Ball_1_Coordinate[2], Ball_2_Coordinate[2]; |
| Nthu_Five | 0:1e1b89f64b66 | 20 | bool TargetCoordinateValid; |
| Nthu_Five | 0:1e1b89f64b66 | 21 | double Car1XforStra1, Car1YforStra1, Car1DirectionforStra1, BlueBallXforStra1, BlueBallYforStra1; |
| Nthu_Five | 0:1e1b89f64b66 | 22 | |
| Nthu_Five | 0:1e1b89f64b66 | 23 | |
| Nthu_Five | 0:1e1b89f64b66 | 24 | |
| Nthu_Five | 0:1e1b89f64b66 | 25 | ///////////////////////////////////////// |
| Nthu_Five | 0:1e1b89f64b66 | 26 | #include "bluetooth.h" |
| Nthu_Five | 0:1e1b89f64b66 | 27 | #include "OutputToMotor.h" |
| Nthu_Five | 0:1e1b89f64b66 | 28 | #include "Interrupt.h" |
| Nthu_Five | 0:1e1b89f64b66 | 29 | #include "strategy1.h" |
| Nthu_Five | 0:1e1b89f64b66 | 30 | #include "setup.h" |
| Nthu_Five | 0:1e1b89f64b66 | 31 | #include "loop.h" |
| Nthu_Five | 0:1e1b89f64b66 | 32 | #include "Function.h" |
| Nthu_Five | 0:1e1b89f64b66 | 33 | |
| Nthu_Five | 0:1e1b89f64b66 | 34 | |
| Nthu_Five | 0:1e1b89f64b66 | 35 | void InitIO(void) |
| Nthu_Five | 0:1e1b89f64b66 | 36 | { |
| Nthu_Five | 0:1e1b89f64b66 | 37 | |
| Nthu_Five | 0:1e1b89f64b66 | 38 | } |
| Nthu_Five | 0:1e1b89f64b66 | 39 | |
| Nthu_Five | 0:1e1b89f64b66 | 40 | int main() |
| Nthu_Five | 0:1e1b89f64b66 | 41 | { |
| Nthu_Five | 0:1e1b89f64b66 | 42 | InitIO(); |
| Nthu_Five | 0:1e1b89f64b66 | 43 | setup(); |
| Nthu_Five | 0:1e1b89f64b66 | 44 | OutputInit(); |
| Nthu_Five | 0:1e1b89f64b66 | 45 | while(1) |
| Nthu_Five | 0:1e1b89f64b66 | 46 | { |
| Nthu_Five | 0:1e1b89f64b66 | 47 | loop(); |
| Nthu_Five | 0:1e1b89f64b66 | 48 | } |
| Nthu_Five | 0:1e1b89f64b66 | 49 | } |