The robot's name is Geoffry in this program. This program tests the "slowstop" function

Dependencies:   m3pi_ng mbed

main.cpp

Committer:
satyson
Date:
2014-05-20
Revision:
0:1242cb9e4142

File content as of revision 0:1242cb9e4142:

    #include "m3pi_ng.h"
    #include "mbed.h"
    
    m3pi Geoffry;
    
    int main () 
    {
     // Give time to back away
     
     //set a slow speed of the robot
     float speed = 0.3;
     
     // Make robot go forward
     // Test to see if forward command operates with the wait command
     
     
     Geoffry.forward(speed);
     wait(0.5);
     Geoffry.slowstop(speed,0.01,100); 
     Geoffry.stop();
     
     
     Geoffry.backward(speed);
     wait(0.5);
     Geoffry.slowstop(-1*speed,0.01,100);
     
     
     
     //This section is to test out the slowstop function
     /*     
     Geoffry.forward(speed+0.2);
     Geoffry.slowstop(speed+0.2,0.1,10.0);   
    
     wait(1.0);
    
     Geoffry.backward(speed+0.2);
     Geoffry.slowstop(speed+0.2,0.1,10.0);
     wait(1.0);
    */
    }