der Roboter
/
Test_SlowDown
The robot's name is Geoffry in this program. This program tests the "slowstop" function
Diff: main.cpp
- Revision:
- 0:1242cb9e4142
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue May 20 14:01:44 2014 +0000 @@ -0,0 +1,40 @@ + #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); + */ + }