Пример #1
0
        /// <summary>
        /// Testing method for MotorDriverL298 module (function never returns)
        /// </summary>
        static void TestMotor()
        {
            MotorDriverL298 motor = new MotorDriverL298(FEZRaptor.Socket18.PwmPin.Controller0.Id, FEZRaptor.Socket18.PwmPin.Controller1.Id,
                                                        FEZRaptor.Socket18.PwmPin.Controller0.PC18, FEZRaptor.Socket18.PwmPin.Controller1.PC19, FEZRaptor.Socket18.Pin6, FEZRaptor.Socket18.Pin9);

            motor.SetSpeed(MotorDriverL298.Motor.Motor1, -0.8);
            motor.SetSpeed(MotorDriverL298.Motor.Motor2, -0.8);
            Thread.Sleep(Timeout.Infinite);
        }
Пример #2
0
 public void launchSpeed(double speed)
 {
     if (speed >= -1.0f && speed <= 1.0f)
     {
         moteur.SetSpeed(MotorDriverL298.Motor.Motor1, speed);
         Informations.printInformations(Priority.MEDIUM, "LanceurBalle : launched motor 1 with speed " + speed);
     }
     else
     {
         Informations.printInformations(Priority.HIGH, "LanceurBalle : VITESSE INVALIDE !!! Doit etre de module <= 1. here speed = " + speed);
     }
 }