public InstructorOnDeviceGoPiGo() { _goPiGo.MotorController().SetLeftMotorSpeed(10); _goPiGo.MotorController().SetRightMotorSpeed(10); _goPiGo = DeviceFactory.Build.BuildGoPiGo(); }
internal MotorController(IGoPiGo goPiGo) { if (goPiGo == null) { throw new ArgumentNullException(nameof(goPiGo)); } GoPiGo = goPiGo; }
public void Run(IBackgroundTaskInstance taskInstance) { _deferral = taskInstance.GetDeferral(); _goPiGo = DeviceFactory.Build.BuildGoPiGo(); _timer = ThreadPoolTimer.CreatePeriodicTimer(TurnLeftGoForward, TimeSpan.FromSeconds(10)); }
internal Sensor(IGoPiGo device, Pin pin) { if (device == null) { throw new ArgumentNullException(nameof(device)); } Device = device; Pin = pin; }
internal Sensor(IGoPiGo device, Pin pin, PinMode pinMode) { if (device == null) { throw new ArgumentNullException(nameof(device)); } device.PinMode(Pin, pinMode); Device = device; Pin = pin; }
public MainPage() { GoPiGo = DeviceFactory.BuildGoPiGo(); GoPiGo.MotorController().EnableServo(); _leftLed = DeviceFactory.BuildLed(Pin.LedLeft); _rightLed = DeviceFactory.BuildLed(Pin.LedRight); this.InitializeComponent(); Stopwatch = new Stopwatch(); Stopwatch.Start(); }
public void Run(IBackgroundTaskInstance taskInstance) { _deferral = taskInstance.GetDeferral(); _goPiGo = DeviceFactory.Build.BuildGoPiGo(); _goPiGo.MotorController().EnableServo(); SocketConnection.StartListener(); SocketConnection.NewMessageReady += SendCommand; }
public MainPage() { InitializeComponent(); _goPiGo = DeviceFactory.Build.BuildGoPiGo(); _goPiGo.MotorController().EnableServo(); _devices = DeviceFactory.Build.BuildUltraSonicSensor(Pin.Trigger); System.Diagnostics.Debug.WriteLine("Start Listener"); ServerSocketConnection.StartListener(); ServerSocketConnection.NewMessageReady += SendCommand; Loaded += MainPage_Loaded; }
public void Run(IBackgroundTaskInstance taskInstance) { random = new Random(); _goPiGo = _deviceFactory.BuildGoPiGo(); _goPiGo.MotorController().EnableServo(); var analogSensor = _deviceFactory.BuildUltraSonicSensor(Pin.Analog1); var test = analogSensor.MeasureInCentimeters(); _goPiGo.MotorController().RotateServo(125); _goPiGo.MotorController().RotateServo(50); _goPiGo.MotorController().RotateServo(-90); //_goPiGo.EncoderController().EnableEncoders(); //var test2 = _goPiGo.EncoderController().ReadEncoder(Motor.MotorOne); _goPiGo.MotorController().MoveForward(); }
public void Run(IBackgroundTaskInstance taskInstance) { random = new Random(); _goPiGo = _deviceFactory.BuildGoPiGo(); _goPiGo.MotorController().EnableServo(); var analogSensor = _deviceFactory.BuildUltraSonicSensor(Pin.Analog1); var test =analogSensor.MeasureInCentimeters(); _goPiGo.MotorController().RotateServo(125); _goPiGo.MotorController().RotateServo(50); _goPiGo.MotorController().RotateServo(-90); //_goPiGo.EncoderController().EnableEncoders(); //var test2 = _goPiGo.EncoderController().ReadEncoder(Motor.MotorOne); _goPiGo.MotorController().MoveForward(); }
public Led(IGoPiGo device, Pin pin) : base(device, pin, PinMode.Output) { }
public MainPage() { this.InitializeComponent(); GoPiGo = DeviceFactory.BuildGoPiGo(); GoPiGo.MotorController().EnableServo(); }
internal MotorController(IGoPiGo goPiGo) { if (goPiGo == null) throw new ArgumentNullException(nameof(goPiGo)); GoPiGo = goPiGo; }
public CommandParser(IGoPiGo goPiGo, ILed leftLed, ILed rightLed) { _goPiGo = goPiGo; _leftLed = leftLed; _rightLed = rightLed; }
internal Led(IGoPiGo device, Pin pin) : base(device, pin, PinMode.Output) { }