Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionss = new SerialStream(); try { ss.Open("LPT1"); } catch (Exception e) { Console.WriteLine("Error: " + e.Message); return; } // Set port settings ss.SetPortSettings(9600); // Set timeout so read ends after 20ms of silence after a response ss.SetTimeouts(20, 0, 0, 0, 0); // Create the StreamWriter used to send commands StreamWriter sw = new StreamWriter(ss, System.Text.Encoding.ASCII); sw.WriteLine("ma chaine"); sw.Flush();