public LightedButton(GpioController controller, int buttonPinNumber, int ledPinNumber, Action buttonAction = null) { ButtonPinNumber = buttonPinNumber; Led = new Led(controller, ledPinNumber, true); InitializeButton(controller); if (buttonAction != null) { SetPressedAction(buttonAction); } }
private static void InitializeLeds() { BlueLed = new Led(Controller, BlueLedPinNumber); GreenLed = new Led(Controller, GreenLedPinNumber); RedLed = new Led(Controller, RedLedPinNumber); }
public void TurnLedOff() { Led.TurnOff(); }
public void TurnLedOn() { Led.TurnOn(); }
public void ToggleLed() { Led.Toggle(); }