/// <summary>
        /// Turns the LED indicator on for a given slot.
        /// </summary>
        /// <param name="n"></param>
        public async Task <bool> EnableLEDAsync(int n)
        {
            try
            {
                if (IsTrayOpen == false)
                {
                    try
                    {
                        if ((Enumerable.Range(1, 8).Contains(n)))
                        {
                            await arduino.WriteDataAsync(n.ToString());

                            await Task.Delay(50);

                            TrayContainer slot = TrayContainers.Single(s => s.ID == n);
                            return(slot.IsIndicatorOn);
                        }
                    }
                    catch (Exception)
                    {
                        throw;
                    }
                }
                return(false);
            }
            catch (Exception)
            {
                throw;
            }
        }
        TrayController()
        {
            arduino = new Arduino();
            arduino.ContentChanged += Arduino_ContentChanged;

            List <TrayContainer> slots = new List <TrayContainer>();

            for (int i = 0; i < 8; i++)
            {
                var slot = new TrayContainer()
                {
                    ID            = i + 1,
                    IsIndicatorOn = false,
                    HasItem       = false
                };
                slot.PropertyChanged += OnContainersChanged;
                slots.Add(slot);
            }

            TrayContainers = new ObservableCollection <TrayContainer>(slots);
            TrayContainers.CollectionChanged += TrayContainers_CollectionChanged;
        }