public ActionResult Get(int red, int green, int blue) { var ledService = new LedService(); ledService.SetColour(red, green, blue); return(Ok()); }
public LEDPage(LedService service) { InitializeComponent(); _service = service; BindingContext = _service; for (int i = 0; i < 5; i++) { for (int j = 0; j < 5; j++) { Button b = new Button(); Tuple <int, int> coordinate = Tuple.Create(i, j); b.Clicked += async(sender, e) => { await _service.FlipLed(coordinate); }; LedGrid.Children.Add(b, j, i); } } }
public DeviceController(GpioService gpioService, LedService ledService) { this.gpioService = gpioService; this.ledService = ledService; }
public LedController(LedService ledService) { this.ledService = ledService; }