Go Down

Topic: Visuall Basic serial communication (Read 934 times) previous topic - next topic


Hi!, I'm new... I would know how could be a code to receive in VB 2008 the following data throught USB (Serial) from Arduino

Serial.print(pulseCounter);          //  pulseCounter is an INT

I only get cut data in VB



I only get cut data in VB

What does this mean? What code is running on the Arduino? What VB code are you using?
The art of getting good answers lies in asking good questions.


I only get cut data in VB

My guess is your VB code is not printing out all the characters you are expecting to see, i.e. the characters print()ed by Arduino.

I have two suggestions: first, if you haven't done it already, open up the serial terminal and look at what exactly Arduino is sending.
Next, look carefully at how you are dealing with received serial data in VB. Remember the mechanism is the same as that on Arduino: the com port delegate (i.e. serial port callback function) is called whenever there is some data for you. You almost certainly have to insert an end-of-message marker on the Arduino side, and concatenate the received bytes on the VB side until that EOM char is seen.

I hope those 4 lines make sense :-)


Sorry, can't say much unless you provide the entire Arduino and VB code...

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131