voidcom_DataReceived(objectsender,SerialDataReceivedEventArgse){// Use either the binary OR the string technique (but not both)// Buffer and process binary datawhile(com.BytesToRead>0)bBuffer.Add((byte)com.ReadByte());ProcessBuffer(bBuffer);// Buffer string datasBuffer+=com.ReadExisting();ProcessBuffer(sBuffer);}privatevoidProcessBuffer(stringsBuffer){// Look in the string for useful information// then remove the useful data from the buffer}privatevoidProcessBuffer(List<byte>bBuffer){// Look in the byte array for useful information// then remove the useful data from the buffer}