Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of IEEE_14_Freescale by
Diff: main.cpp
- 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;