Blocking Motion Commands

Design

Want very simple user command for beginning students:

   rForward (double speed, double time)
speed: range -1.0 to 1.0
1.0: go forward at full speed;
0.0: do not move;
-1.0: go backward at full speed
most beginners use range 0.0 to 1.0

Beginners generally think sequentially: do this command, then that command

Implementation

Easy — Typical code

   rMotors (speed, speed);
   int utime = (int) (time * 1000000);
   usleep (utime);
   rMotors (0.0, 0.0);

created 22 September 2015
last revised 4 November 2015
Valid HTML 4.01! Valid CSS! previous  next