Example #1
0
        public static int Main(string[] args)
        {
            Console.Error.WriteLine("Usage: <program.exe> [led pattern index] [audio pattern index]");
            Console.Error.Write("Connecting device...");
            var deviceController = new DeviceController();
            while (false == deviceController.TryConnect())
            {
                Console.Error.Write(".");
                Thread.Sleep(new TimeSpan(0, 0, 1));
            }
            Console.Error.WriteLine();

            int? lightIndex = TryGetIntArg(args, 0);
            int? audioIndex = TryGetIntArg(args, 1);
            deviceController.PlayAlarm(new TimeSpan(0, 0, 10), lightIndex, audioIndex);
            return 0;
        }