public void SendLEDCommand(Ledcolor ledcolor) { this.ledcolor = ledcolor; mutex.WaitOne(); //Locks mutex client.Send(asen.GetBytes(ledcolor.ToString())); // sends a bite array with the LED color name as string. mutex.ReleaseMutex(); // Opens mutex Console.WriteLine($"LED color {ledcolor.ToString()} sent \r"); }
public void SendLEDCommand(Ledcolor ledcolor) { this.ledcolor = ledcolor; client.Send(asen.GetBytes(ledcolor.ToString())); Console.WriteLine($"LED color {ledcolor.ToString()} sent \r"); }