Hi…
I am doing a project that need to sent and received signal from Computer to PIC and i using RN41 to be my wireless connection.Unfrotunely, i meet a problem, when i success to connect the RN41 with my computer (which mean turn the red LED to Green LED) I unable to sent any data out.
The following is my VB doing
Visual Basic Coding
Private Sub Command1_Click()
If Command1.Caption = “Open” Then
MSComm1.CommPort = 1
MSComm1.PortOpen = True
Command1.Caption = “Close”
Frame1.Enabled = True
Else
MSComm1.PortOpen = False
Command1.Caption = “Open”
Frame1.Enabled = False
End If
End Sub
Private Sub Command2_Click()
MSComm1.Output = “K”
End Sub
Private Sub MSComm1_OnComm()
Dim data As String
If MSComm1.CommEvent = comEvReceive Then
data = MSComm1.Input
If data = “X” Then
Text1.Text = “”
ElseIf data = “Z” Then
Text1.Text = “”
End If
MSComm1.RThreshold = 0
MSComm1.InputLen = 0
End If
MSComm1.RThreshold = 1
MSComm1.InputLen = 1
End Sub
May i know is it my coding got any problem so i not able to sent data out??
Anyone any idea please tell me…
Thanks for advance.
For additional, anyone can contact me with my personal email as well.