public static async Task <BrightnessFileStorage> CreateAsync()
        {
            var temperatureFileStorage = new BrightnessFileStorage();

            await temperatureFileStorage.PrepareFolder();

            await temperatureFileStorage.PrepareFile();

            return(temperatureFileStorage);
        }
        public async Task AddTrainingValue(byte brightness)
        {
            trainingDataSet.Add(new BrightnessDataPoint(brightness));

            // Check if all data points were acquired
            if (trainingDataSet.Count == trainingDataSetLength)
            {
                // If so, save them to csv file
                var brightnessFileStorage = await BrightnessFileStorage.CreateAsync();

                await brightnessFileStorage.WriteData(trainingDataSet);

                // ... and inform listeners that the training data set is ready
                TrainingDataReady?.Invoke(this,
                                          new TrainingDataReadyEventArgs(brightnessFileStorage.FilePath));
            }
        }