Private Sub SerialPort2_DataReceived(ByVal sender As Object, _
ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) _
Handles SerialPort2.DataReceived
If flg = True Then
Exit Sub
End If
flg = True
'データ受信用のバイト配列
Dim inByte2(SerialPort2.BytesToRead - 1) As Byte