Exemplo n.º 1
0
        public void SetPixelColor(int pixel, LedColor color)
        {
            if (port.IsOpen)
            {
                byte[] buffer = new byte[13];
                buffer[0] = 0xAA;

                buffer[1] = Convert.ToByte(pixel);
                buffer[2] = color.R;
                buffer[3] = color.G;
                buffer[4] = color.B;

                port.Write(buffer, 0, buffer.Length);
            }
        }