Example #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            initLED();
            if (ledHelper == null)
            {
                MessageBox.Show("LED初始化失败");
                return;
            }
            string content = textBox3.Text;

            ledHelper.SendLedInfo(content);
            ledHelper.setBrightness(1, 10, null);    //0-15  数值越高越亮
        }
Example #2
0
 private void sendLedInfo(int direction, int color, String sendText)
 {
     if (color == LEDhelp.LEDHelper.GREEN)
     {
         sendText = "\\C2" + sendText;
     }
     else if (color == LEDhelp.LEDHelper.YELLOW)
     {
         sendText = "\\C3" + sendText;
     }
     else
     {
         sendText = "\\C1" + sendText;
     }
     if (direction == LEDhelp.LEDHelper.RIGHT)
     {
         rightLED.SendLedInfo(sendText);
     }
     else
     {
         leftLED.SendLedInfo(sendText);
     }
 }