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