Final Project files for mBed development.

Dependencies:   m3pi mbed

Files at this revision

API Documentation at this revision

Comitter:
lsaristo
Date:
Thu Nov 13 05:02:37 2014 +0000
Parent:
6:00b7198f0b51
Child:
8:12d780f7443e
Commit message:
Fixed bugs from previous changes

Changed in this revision

control.c Show annotated file Show diff for this revision Revisions of this file
main.c Show annotated file Show diff for this revision Revisions of this file
project.h Show annotated file Show diff for this revision Revisions of this file
--- a/control.c	Thu Nov 13 00:00:14 2014 -0500
+++ b/control.c	Thu Nov 13 05:02:37 2014 +0000
@@ -5,8 +5,7 @@
  */
 
 #include "project.h"
-extern pi;
-extern out_pins;
+extern m3pi pi;
 
 int forward(float amt, float spd)
 {
--- a/main.c	Thu Nov 13 00:00:14 2014 -0500
+++ b/main.c	Thu Nov 13 05:02:37 2014 +0000
@@ -12,8 +12,14 @@
 /** 
  * These are global data Used externally in all other files 
  */
-m3pi            pi;
-digi_out_pins   out_pins;
+m3pi        pi;
+DigitalOut  pin15(p15);
+DigitalOut  pin16(p16);
+DigitalOut  pin17(p17);
+DigitalOut  pin18(p18);
+DigitalOut  pin19(p19);
+DigitalOut  pin20(p20);
+
 
 /**
  * @brief Entry point. Main loop.
--- a/project.h	Thu Nov 13 00:00:14 2014 -0500
+++ b/project.h	Thu Nov 13 05:02:37 2014 +0000
@@ -22,16 +22,8 @@
  * Note that by default these output pins are hardwired to the 6 LEDs that 
  * stripe the development extension board. 
  */
-typedef struct {
-    DigitalOut pin15(p15),
-    DigitalOut pin15(p15),
-    DigitalOut pin15(p15),
-    DigitalOut pin15(p16),
-    DigitalOut pin15(p17),
-    DigitalOut pin15(p18),
-    DigitalOut pin15(p19),
-    DigitalOut pin15(p20)
-} digi_out_pins;
+ 
+
 
 /**
  * @brief Driver forward.
@@ -40,7 +32,7 @@
  * @param[in]   spd     Drive speed.
  * @return              Success or failure. 
  */
-int foward(float amt, float spd);
+int forward(float amt, float spd);
 
 /**
  * @brief Drive backward.
@@ -49,7 +41,7 @@
  * @param[in]   spd     Drive speed.
  * @return              Success or failure. 
  */
-int backward(float amt);
+int backward(float amt, float spd);
 
 /**
  * @brief Turn right.