27 #if defined(CONF_DMOTOR)
78 }
else if (dir == ::
rev) {
178 #warning Enable CONF_DMOTOR to use MotorPair.H
179 #endif // CONF_DMOTOR
180 #endif // _MotorPair_H_
~MotorPair()
destroy this MotorPair instance
const Motor mRight
the right Motor instance
void left() const
turn left about the center of the robot
const void brake() const
set the motor to brake
void left(const int s) const
turn left at speed {s}
Interface: console input / output.
void brake() const
stop without coasting
Limits
the minimum and maximum speeds a motor can go, its limits.
void right(const int s) const
turn right at speed {s}
kernel configuration file
C++ Motor Class Interface.
void forward(const int s) const
move forward at speed {s}
const Motor mLeft
the left Motor instance
Pair-of-motors control interface.
const void speed(const unsigned char speed) const
set the motor speed
const void direction(const MotorDirection dir) const
set the motor direction
void off() const
stop but allow coasting
void brake(const int ms) const
apply the brakes to both motors then delay for {ms} mSec
void pivotLeft(const int s) const
turn left at speed {s} but pivot around left wheel
void delay(unsigned ms)
uncalibrated delay loop
void pivotRight(const int s) const
turn right at speed {s} but pivot around right wheel
void forward() const
move forward
void pivotLeft() const
turn left about the left wheel of the robot
void direction(const MotorDirection dir) const
set the direction of our two motors
void speed(const int s) const
set the speed of our two motors
void pivotRight() const
turn right about the right wheel of the robot
Port
valid port designators
void right() const
turn right about the center of the robot
void reverse(const int s) const
move reverse (go backwards) at speed {s}
MotorPair(const Motor::Port lport, const Motor::Port rport)
define a pair of motors specifying the connection of each to the RCX
maximum motor speed setting
MotorDirection
the motor directions
void reverse() const
move reverse
minimum motor speed setting