ObjectFollower
Dependencies: TPixy-Interface
Fork of PlayBack by
main.cpp@9:fe56b888985c, 2018-02-23 (annotated)
- Committer:
- asobhy
- Date:
- Fri Feb 23 20:58:34 2018 +0000
- Revision:
- 9:fe56b888985c
- Parent:
- 8:a0890fa79084
- Child:
- 10:8919b1b76243
right after the two motors are running
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
asobhy | 8:a0890fa79084 | 1 | /******************************************************************************/ |
asobhy | 0:a355e511bc5d | 2 | // ECE4333 |
asobhy | 9:fe56b888985c | 3 | // LAB Partner 1: Ahmed Sobhy - ID: 3594449 |
asobhy | 9:fe56b888985c | 4 | // LAB Partner 2: Brandon Kingman - ID: 3470444 |
asobhy | 9:fe56b888985c | 5 | // Project: Autonomous Robot Design |
asobhy | 9:fe56b888985c | 6 | // Instructor: Prof. Chris Diduch |
asobhy | 8:a0890fa79084 | 7 | /******************************************************************************/ |
asobhy | 0:a355e511bc5d | 8 | |
asobhy | 0:a355e511bc5d | 9 | #include "mbed.h" |
asobhy | 0:a355e511bc5d | 10 | #include "WatchdogThread.h" |
asobhy | 0:a355e511bc5d | 11 | #include "PiControlThread.h" |
asobhy | 0:a355e511bc5d | 12 | #include "ExternalInterruptThread.h" |
asobhy | 0:a355e511bc5d | 13 | #include "ui.h" |
asobhy | 0:a355e511bc5d | 14 | |
asobhy | 0:a355e511bc5d | 15 | /******************************************************************************/ |
asobhy | 0:a355e511bc5d | 16 | |
asobhy | 0:a355e511bc5d | 17 | |
asobhy | 0:a355e511bc5d | 18 | |
asobhy | 0:a355e511bc5d | 19 | /******************************************************************************* |
asobhy | 0:a355e511bc5d | 20 | * ******** Main Thread ******** |
asobhy | 0:a355e511bc5d | 21 | *******************************************************************************/ |
asobhy | 0:a355e511bc5d | 22 | int main() // This thread executes first upon reset or power-on. |
asobhy | 0:a355e511bc5d | 23 | { |
asobhy | 0:a355e511bc5d | 24 | |
asobhy | 0:a355e511bc5d | 25 | // displays msg on terminal |
asobhy | 0:a355e511bc5d | 26 | displayStartupMsg(); |
asobhy | 0:a355e511bc5d | 27 | |
asobhy | 0:a355e511bc5d | 28 | // Initialize and run the threads below: |
asobhy | 0:a355e511bc5d | 29 | WatchdogThreadInit(); |
asobhy | 0:a355e511bc5d | 30 | PiControlThreadInit(); |
asobhy | 0:a355e511bc5d | 31 | ExternalInterruptThreadInit(); |
asobhy | 0:a355e511bc5d | 32 | |
asobhy | 0:a355e511bc5d | 33 | while(1) |
asobhy | 0:a355e511bc5d | 34 | { |
asobhy | 4:417e475239c7 | 35 | consoleUI(); |
asobhy | 0:a355e511bc5d | 36 | Thread::wait(500); // Go to sleep for 500 ms |
asobhy | 0:a355e511bc5d | 37 | } |
asobhy | 0:a355e511bc5d | 38 | } |