private static bool WriteData(HidDevice device, byte[] data) { bool wroteData = device.Write(data); if (!wroteData) Console.WriteLine("Failed to write data"); return wroteData; }