Esempio n. 1
0
 public MainWindow()
 {
     InitializeComponent();
     unit = new eLED.eLED(ip);
     Thread.Sleep(100);
     unit.setBrightness(0, 100);
     Console.WriteLine("Initialized.");
     IP.Content = ip;
 }
Esempio n. 2
0
        public void VideoMatcher(eLED.eLED eLED, int zone, int frequency)
        {
            var matcher = new ScreenMatcher();

            new Thread(() =>
            {
                matcher.startWatching();
            }).Start();


            while (videoMatching)
            {
                Thread.Sleep(1000 / frequency);

                if (matcher.color == -1)
                {
                    eLED.whiteMode(zone);
                }
                else
                {
                    eLED.setColor(zone, matcher.color);
                }
            }
        }