only moves 1 direction

Dependencies:   BLE_API mbed nRF51822

Revision:
4:3e3b4ce8905f
Parent:
3:cf8bb9a7756d
Child:
5:d4f2c480044c
--- a/main.cpp	Tue Sep 01 14:01:33 2015 +0000
+++ b/main.cpp	Wed Sep 02 19:47:45 2015 +0000
@@ -56,9 +56,9 @@
 // Connor's Code start -------------------------------------------------
 DigitalOut myled(P0_19); //onboard LED
 
-DigitalOut pin3(P0_10); // enable h bridge
+PwmOut pin3(P0_10); // enable h bridge
 
-DigitalOut pin1(P0_9); // h bridge 1 Switch these two to change direction
+PwmOut pin1(P0_9); // h bridge 1 Switch these two to change direction
 DigitalOut pin2(P0_11); // h bridge 2
 
 
@@ -93,8 +93,8 @@
 
 void drive_backward(){
 pin3 = 1;
-pin1 = 1;
-pin2 = 0;
+pin1 = 0;
+pin2 = 1;
 }
 
 void drive_forward(){
@@ -209,11 +209,11 @@
     ble.startAdvertising(); 
     pc.printf("Advertising Start \r\n");
     
-    while(1)
-    {
-        dispense();
+    //while(1)
+    //{
+        //dispense();
         //ble.waitForEvent(); 
-    }
+    //}
     
 }