public Zybo() { Fft = new FFT(); Fft.NewFftDataAvailable += Fft_NewFftDataAvailable; RefreshSerialPorts(); FixColorStrip = new LedStrip(); }
public void SendMultipleLeds(LedStrip ledStrip) { if (SerialMaster != null && SerialMaster.IsOpen && !WaitingForResponse) { byte[] command = { 0, 0, Convert.ToByte(ledStrip.NumberOfLeds), COMMAND_SET_MULTIPLE_LEDS }; byte[] data = ledStrip.ToByteArray(); SerialMaster.Write(command, 0, command.Count()); SerialMaster.Write(data, 0, data.Count()); } LedColorChanged?.Invoke(this, ledStrip.Leds); }