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.
GlobalObjects.h@3:c3d716d6c6a7, 2015-03-26 (annotated)
- Committer:
- avinashr
- Date:
- Thu Mar 26 23:41:44 2015 +0000
- Revision:
- 3:c3d716d6c6a7
- Parent:
- 2:2cc70773996b
- Child:
- 4:95fe80130442
Logic completely implemented
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| avinashr | 2:2cc70773996b | 1 | #include "mbed.h" |
| avinashr | 2:2cc70773996b | 2 | #include "DCMotor.h" |
| avinashr | 2:2cc70773996b | 3 | #include "LeftServoMotor.h" |
| avinashr | 2:2cc70773996b | 4 | #include "RightServoMotor.h" |
| avinashr | 2:2cc70773996b | 5 | #include "RequestQueue.h" |
| avinashr | 2:2cc70773996b | 6 | |
| avinashr | 2:2cc70773996b | 7 | #ifndef GLOBALOBJECTS_H |
| avinashr | 2:2cc70773996b | 8 | #define GLOBALOBJECTS_H |
| avinashr | 2:2cc70773996b | 9 | |
| avinashr | 2:2cc70773996b | 10 | Serial pc(USBTX, USBRX); |
| avinashr | 2:2cc70773996b | 11 | DCMotor dcMotor(p21,p17,p18); |
| avinashr | 2:2cc70773996b | 12 | LeftServoMotor leftDoor(p22); |
| avinashr | 2:2cc70773996b | 13 | RightServoMotor rightDoor(p23); |
| avinashr | 2:2cc70773996b | 14 | RequestQueue queue; |
| avinashr | 3:c3d716d6c6a7 | 15 | |
| avinashr | 2:2cc70773996b | 16 | int currentFloor = 1; |
| avinashr | 3:c3d716d6c6a7 | 17 | int movingDirection = 0; //1 for forward, -1 for reverse, 0 for stopping |
| avinashr | 2:2cc70773996b | 18 | |
| avinashr | 2:2cc70773996b | 19 | void floorChosen(int); |
| avinashr | 2:2cc70773996b | 20 | void doStopOperation(); |
| avinashr | 2:2cc70773996b | 21 | void floorReached(int); |
| avinashr | 2:2cc70773996b | 22 | void floorDetected(int); |
| avinashr | 3:c3d716d6c6a7 | 23 | void moveForwad(); |
| avinashr | 3:c3d716d6c6a7 | 24 | void moveReverse(); |
| avinashr | 2:2cc70773996b | 25 | |
| avinashr | 2:2cc70773996b | 26 | #endif |