RFID Card reader USB 28340 FALSE READINGS
Luis_P
Posts: 246
Please help. My USB reader gives me false reading every minute. Something like "F0000F0000". Its very annoying!
I'm using a Visual Basic Express application and my code below. How can avoid this? its something wrong with the reader or code?
Private Sub DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles myComPort.DataReceived
ComboBox2.Invoke(New myDelegate(AddressOf updateTextBox), New Object() {})
End Sub
Public Delegate Sub myDelegate()
Public Sub updateTextBox()
'Combobox2 invoked
data = data + myComPort.ReadExisting()
If Len(data) = 12 Then
ComboBox2.Text = Microsoft.VisualBasic.Mid(data, 2, 10)
Dim timeOut As DateTimeOffset = Now.AddMilliseconds(1500) ' wait
Do
Application.DoEvents()
Loop Until Now > timeOut
data = myComPort.ReadExisting()
myComPort.DiscardInBuffer()
data = ""
'myComPort.DtrEnable = True
End If
End Sub
I'm using a Visual Basic Express application and my code below. How can avoid this? its something wrong with the reader or code?
Private Sub DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles myComPort.DataReceived
ComboBox2.Invoke(New myDelegate(AddressOf updateTextBox), New Object() {})
End Sub
Public Delegate Sub myDelegate()
Public Sub updateTextBox()
'Combobox2 invoked
data = data + myComPort.ReadExisting()
If Len(data) = 12 Then
ComboBox2.Text = Microsoft.VisualBasic.Mid(data, 2, 10)
Dim timeOut As DateTimeOffset = Now.AddMilliseconds(1500) ' wait
Do
Application.DoEvents()
Loop Until Now > timeOut
data = myComPort.ReadExisting()
myComPort.DiscardInBuffer()
data = ""
'myComPort.DtrEnable = True
End If
End Sub
Comments
I know that but how?