Esempio n. 1
0
        public static void Stop()
        {
            // Return if pins are not initialized
            if (MotorLeft_A == null)
            {
                return;
            }

            // Left Motor
            MotorLeft_A.Write(GpioPinValue.Low);
            MotorLeft_B.Write(GpioPinValue.Low);

            // Right Motor
            MotorRight_A.Write(GpioPinValue.Low);
            MotorRight_B.Write(GpioPinValue.Low);

            // Set current state
            _CurrentState = State.Stopped;
        }
Esempio n. 2
0
        public static void MoveReverse()
        {
            // Return if pins are not initialized
            if (MotorLeft_A == null)
            {
                return;
            }

            // Left Motor
            MotorLeft_A.Write(GpioPinValue.High);
            MotorLeft_B.Write(GpioPinValue.Low);

            // Right Motor
            MotorRight_A.Write(GpioPinValue.High);
            MotorRight_B.Write(GpioPinValue.Low);

            // Set current state
            _CurrentState = State.MovingReverse;
        }