Exemplo n.º 1
0
        public CameraPage()
        {
            this.InitializeComponent();
            panLoop = new ServoLoop(200, 200);
            tiltLoop = new ServoLoop(150, 200);

            trackedBlockRect.Visibility = Visibility.Collapsed;
            outputTextBlock.Text = "";
        }
Exemplo n.º 2
0
        public CameraPage()
        {
            this.InitializeComponent();
            panLoop  = new ServoLoop(200, 200);
            tiltLoop = new ServoLoop(150, 200);

            trackedBlockRect.Visibility = Visibility.Collapsed;
            outputTextBlock.Text        = "";
        }
        public ObjectTrackingController()
        {
            ZumoMotorShieldConfig config;
            config = new ZumoMotorShieldConfig();
            config.LeftMotorDirPin = 5;
            config.RightMotorDirPin = 4;
            config.LeftPwmChannel = 1;
            config.RightPwmChannel = 0;
            config.BuzzerPwmChannel = 2;
            config.PwmDriverSlaveAddress = 0x40;

            watch = new Stopwatch();

            motorDriver = new ZumoMotorShield(config);
            pixyCam = new PixyCam();
            panLoop = new ServoLoop(200, 200);
            tiltLoop = new ServoLoop(150, 200);
        }
Exemplo n.º 4
0
        public ObjectTrackingController()
        {
            ZumoMotorShieldConfig config;

            config = new ZumoMotorShieldConfig();
            config.LeftMotorDirPin       = 5;
            config.RightMotorDirPin      = 4;
            config.LeftPwmChannel        = 1;
            config.RightPwmChannel       = 0;
            config.BuzzerPwmChannel      = 2;
            config.PwmDriverSlaveAddress = 0x40;

            watch = new Stopwatch();

            motorDriver = new ZumoMotorShield(config);
            pixyCam     = new PixyCam();
            panLoop     = new ServoLoop(200, 200);
            tiltLoop    = new ServoLoop(150, 200);
        }
Exemplo n.º 5
0
        public ObjectTrackingController()
        {
            ZumoMotorShieldConfig config;
            config = new ZumoMotorShieldConfig();
            config.LeftMotorDirPin = 5;
            config.RightMotorDirPin = 4;
            config.LeftPwmChannel = 1;
            config.RightPwmChannel = 0;
            config.BuzzerPwmChannel = 2;
            config.PwmDriverSlaveAddress = 0x40;

            watch = new Stopwatch();

            motorDriver = new ZumoMotorShield(config);
            pixyCam = new PixyCam();
            panLoop = new ServoLoop(200, 200);
            tiltLoop = new ServoLoop(150, 200);

            stateMachine = new Dictionary<ControllerStateID, ControllerState>();
            stateMachine.Add(ControllerStateID.Scan, new ScanState(this));
            stateMachine.Add(ControllerStateID.Track, new TrackState(this));
            stateMachine.Add(ControllerStateID.Follow, new FollowState(this));
            currentState = ControllerStateID.Scan;
        }