Final Project files for mBed development.

Dependencies:   m3pi mbed

Committer:
John Wilkey
Date:
Thu Nov 13 00:00:14 2014 -0500
Revision:
6:00b7198f0b51
Parent:
5:01882c3de2dc
Child:
7:6e5cc24e1ce7
Untested additions to skelton

Who changed what in which revision?

UserRevisionLine numberNew contents of line
lsaristo 1:7e0243c27ecb 1 /**
lsaristo 1:7e0243c27ecb 2 * @file driver.c
lsaristo 1:7e0243c27ecb 3 * @brief Basic driver program for our robot's controller logic.
lsaristo 1:7e0243c27ecb 4 *
lsaristo 1:7e0243c27ecb 5 * Maybe add lots of stuff here or maybe split it off into
lsaristo 1:7e0243c27ecb 6 * multiple subfiles?
lsaristo 1:7e0243c27ecb 7 *
lsaristo 1:7e0243c27ecb 8 * @author John Wilkey
lsaristo 1:7e0243c27ecb 9 */
John Wilkey 5:01882c3de2dc 10 #include "project.h"
John Wilkey 5:01882c3de2dc 11
John Wilkey 5:01882c3de2dc 12 /**
John Wilkey 5:01882c3de2dc 13 * These are global data Used externally in all other files
John Wilkey 5:01882c3de2dc 14 */
John Wilkey 5:01882c3de2dc 15 m3pi pi;
John Wilkey 5:01882c3de2dc 16 digi_out_pins out_pins;
John Wilkey 5:01882c3de2dc 17
John Wilkey 5:01882c3de2dc 18 /**
John Wilkey 5:01882c3de2dc 19 * @brief Entry point. Main loop.
John Wilkey 5:01882c3de2dc 20 */
John Wilkey 5:01882c3de2dc 21 int main()
John Wilkey 5:01882c3de2dc 22 {
John Wilkey 5:01882c3de2dc 23 pretty_print("PiCO");
John Wilkey 6:00b7198f0b51 24
John Wilkey 6:00b7198f0b51 25 while(1) {
John Wilkey 6:00b7198f0b51 26 wait(2);
John Wilkey 6:00b7198f0b51 27 forward(10, DRIVE_SPEED);
John Wilkey 6:00b7198f0b51 28 wait(2);
John Wilkey 6:00b7198f0b51 29 backward(10, DRIVE_SPEED);
John Wilkey 6:00b7198f0b51 30 }
John Wilkey 6:00b7198f0b51 31
John Wilkey 6:00b7198f0b51 32 //
John Wilkey 6:00b7198f0b51 33 // Our code should NEVER reach this point.
John Wilkey 6:00b7198f0b51 34 return EXIT_FAILURE;
John Wilkey 5:01882c3de2dc 35 }