Motor is being implemented in this version. Trying to implement catching errors

Dependencies:   mbed Tracker

Revision:
1:90b640c90506
Parent:
0:6942f0e2198c
Child:
2:7811df5a6052
--- a/DumpTruck.cpp	Tue Nov 01 20:13:57 2016 +0000
+++ b/DumpTruck.cpp	Tue Nov 01 20:19:20 2016 +0000
@@ -58,9 +58,9 @@
       pc.printf("Please enter the truck speed: \n");
       // sets return value to given value
       float input = pc.getc();
-      while ((input<48)&&(input>57)){
+      while ((input<48)||(input>57)){
           pc.printf("Fix your input sir: \r\n");
-          float input = pc.getc();
+          input = pc.getc();
           }
       input = input - 48;
       input = input * (1/div);