public void SetColor(int index, RGB rgb) { lock (lockObj) { LEDStrip.SetPixel(index, rgb); LEDStrip.UpdateStrip(); } }
public void SetColor(int index, Color color) { RGB rgb; try { rgb = Constants.ColorToRGB[color]; } catch (Exception) { rgb = new RGB(0, 0, 0); } SetColor(index, rgb); }
public static void SetPixel(int pixel, RGB color) { SetPixel((byte)pixel, color.red, color.green, color.blue); }