Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public async Task ChangeState()
 {
     CarTrafficLight.ToggleState();
     await PedestrianTrafficLight.ToggleState();
 }