private void SetLogLevel(IPwmDevice device) { var stubPwmDevice = device as PwmDeviceStub; if (stubPwmDevice != null) { // Remove sign of life which is too chatty stubPwmDevice.LogChannels.Remove(PwmChannel.C0); } }
private void SetLogLevel(IPwmDevice device) { var stubPwmDevice = device as PwmDeviceStub; if (stubPwmDevice != null) { // Remove sign of life which is too chatty stubPwmDevice.LogChannels.Remove(PwmChannel.C0); } }
private void RunRawPwm(IPwmDevice pwmDevice) { while (!Console.KeyAvailable) { var channel = PwmChannel.C0; var pwmOn = 2000; var pwmOff = 2000; Log.Info(m => m("Set channel={0} to {1}", channel, pwmOn)); pwmDevice.SetPwm(channel, 0, pwmOn); Thread.Sleep(1000); Log.Info(m => m("Set channel={0} to {1}", channel, pwmOff)); pwmDevice.SetPwm(PwmChannel.C0, 0, pwmOff); Thread.Sleep(1000); } }
public StepperMotor( IPwmDevice controller , PwmChannel controlChannel0 , PwmChannel controlChannel1 , PwmChannel controlChannel2 , PwmChannel controlChannel3) : base(controller) { _channels = new [] {controlChannel0, controlChannel1, controlChannel2, controlChannel3}; _currentStep = 0; StepDelayMs = 100; Sequence = new[] { "1000", "1100", "0100", "0110", "0010", "0011", "0001", "1001" }; }
public StepperMotor( IPwmDevice controller , PwmChannel controlChannel0 , PwmChannel controlChannel1 , PwmChannel controlChannel2 , PwmChannel controlChannel3) : base(controller) { _channels = new [] { controlChannel0, controlChannel1, controlChannel2, controlChannel3 }; _currentStep = 0; StepDelayMs = 100; Sequence = new[] { "1000", "1100", "0100", "0110", "0010", "0011", "0001", "1001" }; }
public PwmController(IPwmDevice pwmDevice) { _pwmDevice = pwmDevice; }
public PanTiltMechanism(IPwmDevice pwmDevice) : base(pwmDevice) { PanServo = new ServoMotor(PwmDevice, PwmChannel.C1, 130, 670); TiltServo = new ServoMotor(PwmDevice, PwmChannel.C0, 130, 670); }
protected PwmControlBase(IPwmDevice pwmDevice) { PwmDevice = pwmDevice; }
public PwmController(IPwmDevice pwmDevice) : base(pwmDevice) { }
protected PwmControlBase(IPwmDevice pwmDevice) { PwmDevice = pwmDevice; // _components = new Dictionary<PwmChannel, PwmComponentBase>(); }
protected PwmComponentBase(IPwmDevice controller) { Controller = controller; }
public ServoMotor(IPwmDevice controller, PwmChannel channel, int mimimum, int maximum): base(controller) { Channel = channel; MaximumPosition = maximum; MinimumPosition = mimimum; }
public Led(IPwmDevice controller, PwmChannel channel) : base(controller) { _channel = channel; }
public ServoSortPwmControl(IPwmDevice pwmDevice) : base(pwmDevice) { }
public ServoMotor(IPwmDevice controller, PwmChannel channel, int mimimum, int maximum) : base(controller) { Channel = channel; MaximumPosition = maximum; MinimumPosition = mimimum; }
public PanTiltMechanism(IPwmDevice pwmDevice) : base(pwmDevice) { PanServo = new ServoMotor(PwmDevice, PwmChannel.C1, 130, 670); TiltServo = new ServoMotor(PwmDevice, PwmChannel.C0, 130, 670); }
public PwmController(IPwmDevice pwmDevice) { _pwmDevice = pwmDevice; }
public PwmController(IPwmDevice pwmDevice) : base(pwmDevice) { }
/// <summary> /// Assumes a SN754410 or equivalent wired to the PWM channels /// </summary> public DcMotor(IPwmDevice controller, PwmChannel controlChannel0, PwmChannel controlChannel1) : base(controller) { _controlChannel0 = controlChannel0; _controlChannel1 = controlChannel1; }
public Led(IPwmDevice controller, PwmChannel channel) : base(controller) { _channel = channel; }
private void RunRawPwm(IPwmDevice pwmDevice) { while (!Console.KeyAvailable) { var channel = PwmChannel.C0; var pwmOn = 2000; var pwmOff = 2000; Log.Info(m => m("Set channel={0} to {1}", channel, pwmOn)); pwmDevice.SetPwm(channel, 0, pwmOn); Thread.Sleep(1000); Log.Info(m => m("Set channel={0} to {1}", channel, pwmOff)); pwmDevice.SetPwm(PwmChannel.C0, 0, pwmOff); Thread.Sleep(1000); } }
protected PwmControlBase(IPwmDevice pwmDevice) { PwmDevice = pwmDevice; }
protected PwmControlBase(IPwmDevice pwmDevice) { PwmDevice = pwmDevice; // _components = new Dictionary<PwmChannel, PwmComponentBase>(); }
public ServoSortPwmControl(IPwmDevice pwmDevice) : base(pwmDevice) { }
protected PwmComponentBase(IPwmDevice controller) { Controller = controller; }
/// <summary> /// Assumes a SN754410 or equivalent wired to the PWM channels /// </summary> public DcMotor(IPwmDevice controller, PwmChannel controlChannel0, PwmChannel controlChannel1) : base(controller) { _controlChannel0 = controlChannel0; _controlChannel1 = controlChannel1; }