First release
Dependencies: CreaBotLib LED_WS2812 MotorLib X_NUCLEO_6180XA1 mbed
Revision 1:3589e8f6e99c, committed 2018-09-24
- Comitter:
- alcocerg
- Date:
- Mon Sep 24 12:53:58 2018 +0000
- Parent:
- 0:1f59690eebe2
- Commit message:
- update
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 1f59690eebe2 -r 3589e8f6e99c main.cpp --- a/main.cpp Wed Sep 19 14:20:26 2018 +0000 +++ b/main.cpp Mon Sep 24 12:53:58 2018 +0000 @@ -71,12 +71,18 @@ { DEBUG("routine1\n\r"); wait(1); - ledBand.SetColor(WHITE,0) ; - ledBand.SetColor(RED,1) ; - ledBand.SetColor(BLUE,2) ; - ledBand.SetColor(GREEN,3) ; - ledBand.StartRotation(1.0) ; mybot.move(FORWARD,200); + ledBand.SetColor(BLUE,0) ; + ledBand.SetColor(BLACK,1) ; + ledBand.SetColor(BLACK,2) ; + ledBand.SetColor(BLACK,3) ; + ledBand.StartRotation(0.5) ; + wait(2); + ledBand.SetColor(WHITE,0) ; + ledBand.SetColor(BLACK,1) ; + ledBand.SetColor(BLACK,2) ; + ledBand.SetColor(BLACK,3) ; + ledBand.StartRotation(0.5) ; state=0; /* mybot.move(FORWARD,9); dist=200; @@ -84,7 +90,11 @@ {wait (0.3); board->sensor_bottom->get_distance(&dist) ; } DEBUG ("Distance: %d \n\r", dist); - mybot.stopMove(); */ + mybot.stopMove(); + ledBand.SetColor(WHITE,0) ; + ledBand.SetColor(RED,1) ; + ledBand.SetColor(BLUE,2) ; + ledBand.SetColor(GREEN,3) ; */ } void routine2() @@ -112,7 +122,6 @@ DEBUG("routines\n\r"); wait(1); ledBand.StopRotation(); - ledBand.StopBlink() ; ledBand.SetColor(BLACK,0) ; ledBand.SetColor(BLACK,1) ; ledBand.SetColor(BLACK,2) ; @@ -132,7 +141,7 @@ CASE('l', "lance la routine 1", routine1(); ) CASE('m', "lance la routine 2", routine2(); ) CASE('s', "stoppe les routines", routines(); ) - + CASE('t', "accelere", routines(); ) default : DEBUG("invalid command; use: 'h' for help()\n\r"); state=0; @@ -149,7 +158,9 @@ case 'm': commandRECEIVED = 'm'; break; - + case 't': + commandRECEIVED = 't'; + break; default: commandRECEIVED = 'h'; } }