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@3:f95202266527, 2016-06-04 (annotated)
- Committer:
- Nthu_Five
- Date:
- Sat Jun 04 04:21:39 2016 +0000
- Revision:
- 3:f95202266527
- Parent:
- 2:4a65758cf752
- Child:
- 4:4843445e717a
blablabla
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 | 3:f95202266527 | 5 | |
| Nthu_Five | 0:1e1b89f64b66 | 6 | //////////////////////////////Init |
| Nthu_Five | 0:1e1b89f64b66 | 7 | |
| Nthu_Five | 0:1e1b89f64b66 | 8 | Serial pc(SERIAL_TX, SERIAL_RX); |
| 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 | |
| Nthu_Five | 0:1e1b89f64b66 | 15 | /////////////////////////////globle |
| Nthu_Five | 0:1e1b89f64b66 | 16 | double NowCoordinate[2]; |
| Nthu_Five | 0:1e1b89f64b66 | 17 | double NowFaceAngle, NowDirectionInRad; |
| Nthu_Five | 0:1e1b89f64b66 | 18 | long SelfRotation; |
| Nthu_Five | 0:1e1b89f64b66 | 19 | double TargetCoordinate[2]; |
| Nthu_Five | 3:f95202266527 | 20 | double Goal_1_Coordinate[2], Goal_2_Coordinate[2], Ball_Coordinate[2], Last_Ball_Coordinate[2];//, Ball_2_Coordinate[2]; |
| Nthu_Five | 0:1e1b89f64b66 | 21 | bool TargetCoordinateValid; |
| Nthu_Five | 2:4a65758cf752 | 22 | double Car1XforStra1, Car1YforStra1, Car1DirectionforStra1, BlueBallXforStra1, BlueBallYforStra1, GreenBallXforStra1, GreenBallYforStra1; |
| Nthu_Five | 3:f95202266527 | 23 | double Car2XforStra1, Car2YforStra1, Car2DirectionforStra1; |
| Nthu_Five | 0:1e1b89f64b66 | 24 | |
| Nthu_Five | 0:1e1b89f64b66 | 25 | |
| Nthu_Five | 0:1e1b89f64b66 | 26 | ///////////////////////////////////////// |
| Nthu_Five | 1:fa858ba076b3 | 27 | //#include "bluetooth.h" |
| Nthu_Five | 2:4a65758cf752 | 28 | #include "DebugBluetooth.h" |
| Nthu_Five | 0:1e1b89f64b66 | 29 | #include "OutputToMotor.h" |
| Nthu_Five | 0:1e1b89f64b66 | 30 | #include "Interrupt.h" |
| Nthu_Five | 3:f95202266527 | 31 | |
| Nthu_Five | 3:f95202266527 | 32 | #include "bluetooth.h" |
| Nthu_Five | 3:f95202266527 | 33 | #include "NewBluetooth.h" |
| Nthu_Five | 0:1e1b89f64b66 | 34 | #include "strategy1.h" |
| Nthu_Five | 0:1e1b89f64b66 | 35 | #include "setup.h" |
| Nthu_Five | 0:1e1b89f64b66 | 36 | #include "loop.h" |
| Nthu_Five | 0:1e1b89f64b66 | 37 | #include "Function.h" |
| Nthu_Five | 0:1e1b89f64b66 | 38 | |
| Nthu_Five | 0:1e1b89f64b66 | 39 | |
| Nthu_Five | 3:f95202266527 | 40 | |
| Nthu_Five | 0:1e1b89f64b66 | 41 | void InitIO(void) |
| Nthu_Five | 0:1e1b89f64b66 | 42 | { |
| Nthu_Five | 0:1e1b89f64b66 | 43 | |
| Nthu_Five | 0:1e1b89f64b66 | 44 | } |
| Nthu_Five | 0:1e1b89f64b66 | 45 | |
| Nthu_Five | 0:1e1b89f64b66 | 46 | int main() |
| Nthu_Five | 0:1e1b89f64b66 | 47 | { |
| Nthu_Five | 0:1e1b89f64b66 | 48 | InitIO(); |
| Nthu_Five | 0:1e1b89f64b66 | 49 | setup(); |
| Nthu_Five | 0:1e1b89f64b66 | 50 | OutputInit(); |
| Nthu_Five | 0:1e1b89f64b66 | 51 | while(1) |
| Nthu_Five | 0:1e1b89f64b66 | 52 | { |
| Nthu_Five | 0:1e1b89f64b66 | 53 | loop(); |
| Nthu_Five | 3:f95202266527 | 54 | |
| Nthu_Five | 0:1e1b89f64b66 | 55 | } |
| Nthu_Five | 0:1e1b89f64b66 | 56 | } |