public static async Task StartLoop(Options options, IConfigurationRoot configuration)
        {
            var httpClient = new HttpClient();

            while (true)
            {
                var width  = int.Parse(configuration["WebAPI:Capture:Width"]);
                var heigth = int.Parse(configuration["WebAPI:Capture:Heigth"]);

                var pictureBytes = await Pi.Camera.CaptureImageJpegAsync(width, heigth);

                var capture = new CreateCapture(options.Robot, pictureBytes);

                httpClient.PostAsync(configuration["WebAPI:Capture:Endpoint"], HttpService.SerializeContent(capture));
            }
        }
 public async Task <IActionResult> CreateCaptureAsync(CreateCapture request)
 {
     return(Ok(await _captureService.CreateCaptureAsync(_mapper.Map <CreateCaptureRequest>(request))));
 }