Esempio n. 1
0
        public void HandleButtonPress(ControlButton button)
        {
            if (button.Color == "Red")
            {
                _count--;
            }
            else if (button.Color == "Green")
            {
                _count++;
            }
            else if (button.Color == "Blue")
            {
                _serialBridge.WriteLine("bing");
                //
                // _mp3Trigger.Forward();
            }
            else if (button.Color == "Yellow")
            {
                _serialBridge.WriteLine("ping");
                //_emic2.IncrementVoice();
                // Thread.Sleep(200);
            }

            _serLcd.Write(button.Color, PadCount());
            //_emic2.Say(_count.ToString());
            // _blinkMs.UpdateBlinkMs(button.Hue);
        }
Esempio n. 2
0
        public Nexus()
        {
            _serLcd = new SerLCD();
            _serLcd.Write("hello", "world");

            _serialBridge           = new SerialBridge(Serial.COM2);
            _serialBridge.ReadLine += new ThreadedSerialDevice.ReadHandler(_serialBridge_ReadLine);

            // _blinkMs = new BlinkMArray();

            // _mp3Trigger = new Mp3Trigger();
            // _mp3Trigger.SetVolume(64);

            //_emic2 = new Emic2();
            //_emic2.Say("hello");

            _button_Red    = new ControlButton(Pins.GPIO_PIN_D5, "Red", 0, this);
            _button_Green  = new ControlButton(Pins.GPIO_PIN_D6, "Green", 80, this);
            _button_Blue   = new ControlButton(Pins.GPIO_PIN_D9, "Blue", 160, this);
            _button_Yellow = new ControlButton(Pins.GPIO_PIN_D10, "Yellow", 42, this);
        }
Esempio n. 3
0
        public void HandleButtonPress(ControlButton button)
        {
            if (button.Color == "Red")
            {
                _count--;
            }
            else if (button.Color == "Green")
            {
                _count++;
            }
            else if (button.Color == "Blue")
            {
                _serialBridge.WriteLine("bing");
                //
                // _mp3Trigger.Forward();
            }
            else if (button.Color == "Yellow")
            {
                _serialBridge.WriteLine("ping");
                //_emic2.IncrementVoice();
               // Thread.Sleep(200);
            }

            _serLcd.Write(button.Color, PadCount());
            //_emic2.Say(_count.ToString());
            // _blinkMs.UpdateBlinkMs(button.Hue);
        }
Esempio n. 4
0
        public Nexus()
        {
            _serLcd = new SerLCD();
            _serLcd.Write("hello", "world");

            _serialBridge = new SerialBridge(Serial.COM2);
            _serialBridge.ReadLine += new ThreadedSerialDevice.ReadHandler(_serialBridge_ReadLine);

            // _blinkMs = new BlinkMArray();

            // _mp3Trigger = new Mp3Trigger();
            // _mp3Trigger.SetVolume(64);

            //_emic2 = new Emic2();
            //_emic2.Say("hello");

            _button_Red = new ControlButton(Pins.GPIO_PIN_D5, "Red", 0, this);
            _button_Green = new ControlButton(Pins.GPIO_PIN_D6, "Green", 80, this);
            _button_Blue = new ControlButton(Pins.GPIO_PIN_D9, "Blue", 160, this);
            _button_Yellow = new ControlButton(Pins.GPIO_PIN_D10, "Yellow", 42, this);
        }