public AmbilightLayout CreateAmbilight() { var leftAmbilight = new PixelStrip(13, 114); var rightAmbilight = new PixelStrip(13, 127); return(new AmbilightLayout(leftAmbilight, rightAmbilight)); }
public PluginLayout CreateLayout() { var minuteStrip = new PixelStrip(4, 110); var matrix = new Matrix(11, 10); return(new PluginLayout(matrix, minuteStrip)); }
public static void Main(string[] args) { Client client = new Client("127.0.0.1", 7890, true, true); PixelStrip pixels = new PixelStrip(30); while (true) { for (int i = 0; i <= 360; i = i + 5) { var color = new HSLColor(hue: i, saturation: 100, luminosity: 100); pixels.AddFirst(color.ToRgbPixel()); client.putPixels(pixels); Thread.Sleep(50); } } }
public override IEnumerator Effect(Client client, float delay) { // So it can modified during runtime. Delay = delay; PixelStrip pixels = new PixelStrip(BufferSize); while (true) { for (int i = 0; i <= 360; i = i + 5) { var color = new HSLColor(hue: i, saturation: 100, luminosity: 100); pixels.AddFirst(color.ToRgbPixel()); client.putPixels(pixels); yield return(new WaitForSeconds(Delay)); } } }