public TrafficLightModel() { ChangeStateCommand = new ToggleStateCommand(); _gpio = GpioController.GetDefault(); CarTrafficLight = new CarTrafficLight(1, TrafficState.GO, _gpio, 5, 6, 13); PedestrianTrafficLight = new PedestrianLight(2, TrafficState.STOP, _gpio, 17, 27, 22); }
public async Task ChangeState() { CarTrafficLight.ToggleState(); await PedestrianTrafficLight.ToggleState(); }