Sooner Competitive Robotics / Mbed 2 deprecated IEEE_14_Freescale

Dependencies:   mbed

Fork of IEEE_14_Freescale by IEEE 2014 Mbed

Revision:
33:03b0b66038e1
Parent:
31:4ef53fbd6759
Child:
34:4ad11cda1eca
--- a/main.cpp	Sat Mar 22 20:17:29 2014 +0000
+++ b/main.cpp	Sun Mar 23 02:23:29 2014 +0000
@@ -2,11 +2,13 @@
 #include "dbgprint.h"
 #include "robot.h"
 #include "hcsr04.h"
+#include "game.h"
 
 BusOut leds(LED_RED,LED_GREEN,LED_BLUE);
 Serial pc(USBTX, USBRX);
 
 robot bot;
+gamePlayer game(bot);
 servo s(PTC9);
 
 /*
@@ -152,7 +154,9 @@
                 break;
             case 'g':
                 DBGPRINT("full rotation %d,%f -> ",bot.gyro.getZ(),bot.gyro.getZDegrees());
-                bot.smoothMove(8000, 1, 40);
+                for(int i=0;i<36;i++){
+                    bot.smoothMove((8000.0/360.0)*(10.0), 1, 40);
+                }
                 DBGPRINT(" %d,%f\r\n",bot.gyro.getZ(),bot.gyro.getZDegrees());
                 break;
             case 'y':
@@ -191,8 +195,8 @@
                 //DBGPRINT("angfac = %f\r\n",bot.angfac);
                 break;
             case 'T':
-                //bot.pfac*=1.05;
-                //DBGPRINT("pfac = %f\r\n",bot.pfac);
+                DBGPRINT("Finding Gap\r\n",1);
+                game.checkWaves();
                 break;
             case 'G':
                 //bot.pfac/=1.05;