Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. SerialPort port = new SerialPort("COM7",38400,Parity.Even,8,StopBits.One);
  2.  
  3. port.Open();
  4. bool isopen = port.IsOpen; //me muestraque esta conectado
  5.  
  6. byte[] iniciarScr = {0xf2,0x00,0x03,0x43, 0x30, 0x40,0x88,0x8c }
  7. port.Write(iniciarScr, 0, iniciarScr.Length);
  8. byte[] bufferRespuesta = new byte[256];
  9. var bytesRead = port.Read(bufferRespuesta, 0 bufferRespuesta.Length);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement