22 DBFUNCCALLln(
"Drive::Drive(const int MotorPortRight, const int MotorPortLeft)");
30 DBFUNCCALLln(
"Drive::drive(Direction direction, unsigned int speed)");
31 speed = constrain(speed, 0, 255);
54 DBFUNCCALLln(
"Drive::turn(Direction direction, unsigned int speed)");
88 DBFUNCCALLln(
"Drive::turn(Direction direction, unsigned int speed)");
89 speed = constrain(speed, 0, 255);
111 DBFUNCCALLln(
"Drive::stop()");
112 DBINFO3ln(
"Drive Stop!");
125 DBFUNCCALLln(
"Drive::decodeDirection(Direction direction)");
128 return "Direction::Left";
131 return "Direction::Right";
134 return "Direction::Forward";
137 return "Direction::Backward";
140 return "ERROR: No matching event";
Direction pWayVehicle
Actual movingdirection Forward or Backward.
Direction
Direction enum holds all possible directions.
String decodeDirection(Direction direction)
Decodes the Direction-Enum and returns a description.
int pSpeedRight
actual Speed of right Motor
void drive(Direction direction, unsigned int speed)
Drive straight Forwards or Backwards.
Adafruit_DCMotor * pMotorRight
Pointer to right Motor Obj.
Drive(const int MotorPortRight, const int MotorPortLeft)
Construct a new Drive object https://www.adafruit.com/product/2927.
void stop()
Power of the Motor. Does not apply breaking.
void turn(Direction direction, unsigned int speed)
Turn left or right. Speed will add to one Motor's actual speed and substract from the others depenig ...
The Drive Class handles the activation of the dc-motors for the drive.
int pSpeedLeft
actual Speed of left Motor
Adafruit_MotorShield pAFMS
void turnonpoint(Direction direction, unsigned int speed)
Turn on Point Drive on Motor Forward and the other Backward with the given speed.
Adafruit_DCMotor * pMotorLeft
Pointer to left Motor Obj.