Ejemplo n.º 1
0
        public StepperMotorController(CTRE.Phoenix.CANifier CANifier, CTRE.Phoenix.CANifier.GeneralPin directionPin, Microsoft.SPOT.Hardware.Cpu.PWMChannel movePin, uint maxSpeed,
                                      CTRE.Phoenix.CANifier.GeneralPin forwardLimitSwitchPin, CTRE.Phoenix.CANifier.GeneralPin reverseLimitSwitchPin)
        {
            lastDirection = Direction.STOPPED;

            this.maxSpeed = maxSpeed;

            this.directionPort      = directionPin;
            this.forwardLimitSwitch = forwardLimitSwitchPin;
            this.reverseLimitSwitch = reverseLimitSwitchPin;
            this.CANifier           = CANifier;

            movePort = new PWM(movePin, maxSpeed, maxSpeed / 2, PWM.ScaleFactor.Microseconds, false);
        }
Ejemplo n.º 2
0
 public LimitSwitch(CTRE.Phoenix.CANifier CANifier, CTRE.Phoenix.CANifier.GeneralPin CANifierPin)
 {
     this.CANifier    = CANifier;
     this.CANifierPin = CANifierPin;
 }