Exemple #1
0
        private static IDriveTrain DriveTrain()
        {
            IMotor motorL = new Motor();
            IMotor motorR = new Motor();

            motorL.Connect(Pins.GPIO_PIN_D7, Pins.GPIO_PIN_D4, PWMChannels.PWM_PIN_D6);
            motorR.Connect(Pins.GPIO_PIN_D2, Pins.GPIO_PIN_D3, PWMChannels.PWM_PIN_D5);

            DriveTrain driveTrain = new DriveTrain();
            driveTrain.ConnectFour(motorL, motorR);

            return driveTrain;
        }
Exemple #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            DriveTrain driveTrain = new DriveTrain();
            driveTrain.ConnectFour(motor1, motor2);

            IPing ping = new xPing1();
            PingStream pingStream = new PingStream(ping);
            pingStream.PingList = new xPingList1();

            Captain captain = new Captain();

            captain.ConnectDriveTrain(driveTrain);
            captain.ConenctPingStream(pingStream);
        }