private void SetScoreLights() { if (_score >= 1) { _score1.TurnOn(); } else { _score1.TurnOff(); } if (_score >= 2) { _score2.TurnOn(); } else { _score2.TurnOff(); } if (_score >= 3) { _score3.TurnOn(); } else { _score3.TurnOff(); } }
/// <summary>Starts the motor running in the set direction</summary> public void Start() { switch (Direction) { case Rotation.Clockwise: _clockwise.TurnOn(); _counterclockwise?.TurnOff(); break; case Rotation.Counterclockwise: _clockwise.TurnOff(); _counterclockwise?.TurnOn(); break; default: throw new InvalidEnumArgumentException(nameof(Direction)); } _enabled?.TurnOn(); }
/// <summary>Stops the motor immediately</summary> public void Stop() { _clockwise.TurnOff(); _counterclockwise?.TurnOff(); _enabled?.TurnOff(); }
/// <summary>Clears the value stored in the register</summary> public void Clear() { _clear?.TurnOn(); _output.Spike(); _clear?.TurnOff(); }
public void TurnGreen() { _red.TurnOff(); _green.TurnOn(); _blue.TurnOff(); }