ManualControl

Dependencies:   TPixy-Interface

Fork of MbedOS_Robot by ECE4333 - 2018 - Ahmed & Brandon

Committer:
asobhy
Date:
Mon Feb 19 17:42:33 2018 +0000
Revision:
8:a0890fa79084
Parent:
4:417e475239c7
Child:
9:fe56b888985c
added more comments

Who changed what in which revision?

UserRevisionLine numberNew contents of line
asobhy 8:a0890fa79084 1 /******************************************************************************/
asobhy 0:a355e511bc5d 2 // ECE4333
asobhy 8:a0890fa79084 3 // LAB Partner 1: Ahmed Sobhy - ID: 3594449
asobhy 8:a0890fa79084 4 // LAB Partner 2: Brandon Kingman - ID: 3470444
asobhy 8:a0890fa79084 5 // Project: Autonomous Robot Design
asobhy 8:a0890fa79084 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 }