Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- port = new SerialPort("COM7", 250000, Parity.None, 8, StopBits.One);
- port.Handshake = Handshake.None;
- port.Open();
- byte[] a = new byte[4] { 50, 51, 52, 53 };
- byte[] c = new byte[4];
- port.Write(a, 0, 4);
- port.Read(c, 0, 4);
- for (int i = 0; i < 4; i++)
- {
- Console.WriteLine(c[i]);
- }
- Console.WriteLine("ok");
Advertisement
Add Comment
Please, Sign In to add comment