/// <summary> /// Creates an instance of the motor driver. /// </summary> /// <param name="leftPwm">The pin connected to the left motor channel's PWM pin on the driver (PWMA)</param> /// <param name="leftForwardPin">The pin connected to the left motor channel's forward direction pin on the driver (AIN0)</param> /// <param name="leftReversePin">The pin connected to the left motor channel's reverse direction pin on the driver (AIN1)</param> /// <param name="rightPwm">The pin connected to the righ motor channel's PWM pin on the driver (PWMB)</param> /// <param name="rightForwardPin">The pin connected to the righ motor channel's forward direction pin on the driver (BIN0)</param> /// <param name="rightReversePin">The pin connected to the righ motor channel's reverse direction pin on the driver (BIN1)</param> /// <param name="standbyPin">The pin connected to the motor driver's standby pin (STBY) </param> public MotorDriver( PWM.Pin leftPwm, Cpu.Pin leftForwardPin, Cpu.Pin leftReversePin, PWM.Pin rightPwm, Cpu.Pin rightForwardPin, Cpu.Pin rightReversePin, Cpu.Pin standbyPin ) { leftMotor = new Motor(leftPwm, leftForwardPin, leftReversePin); rightMotor = new Motor(rightPwm, rightForwardPin, rightReversePin); standbyPort = new OutputPort(standbyPin, false); }
public MotorTestBot(Motor left, Motor right, OutputPort control) { this.left = left; this.right = right; this.control = control; }