Manual
www.nexusrobot.com Robot Kits manual
62
Motor _state enum
Used to configure the behavior of a motor.
Note that not all motors can be configured in every state.
Variables:
MOTORS_FB
The switchmotorstat is FB
MOTORS_BF
The switchmotorstat is BF
unsigned char getSwitchMotorsStat() const
Get the state of the Motor
return : The motor’s state
unsigned int getRadiusMM() const
Get the radius the car moves
If the car state was rotateleft or rotateright.
This will lie within the range specified at R2WD::getWheelspanMM
return : radius
¾ Private parameters
MotorWheel* _wheelLeft
A point named wheelLeft as the object of MotorWheel
MotorWheel* _wheelRight
A point named wheelRight as the object of MotorWheel
unsigned int _wheelspanMM
Save a data of the span, will set to the wheel
unsigned char _carStat
Save the state of the car
unsigned char setCarStat(unsigned char stat)
Set the Car’s state
Parameters: unsigned char stat