Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21263

[HELP] Linking Arduino to VB6

$
0
0
I want to link Arduino to Visual Basic 6 to transmit the input pulse signal generated from the coin slot. I just used a simple code of displaying "Hello World" in Arduino to link it with Visual Basic. I'm expecting that "Hello World" will be displayed in VB6, however, a run time error 8020 occurred. Here is the code used in Arduino:
Quote:

void setup()
{
Serial.begin(9600);
Serial.println("Hello world!");
}
void loop()
{
}
My code in Visual Basic:
Quote:

Private Sub Form_Load()
MSComm1.Settings = "9600,N,8,1"
MSComm1.CommPort = 7
MSComm1.RThreshold = 1
MSComm1.PortOpen = True
End Sub

Private Sub MSComm1_OnComm()
Dim strData As String
Select Case MSComm1.CommEvent
Case comEvReceive
strData = MSComm1.Input
Debug.Print strData;
End Select
End Sub

Any help will be much appreciated.

Viewing all articles
Browse latest Browse all 21263

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>