Loading...
Pages: [1]   Go Down
Author Topic: COM Port Communication with VB  (Read 830 times)
0 Members and 1 Guest are viewing this topic.
Magdeburg
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey Guys,

i'm working for a few hours at the communication between my PC and a Leonardo, but I have a big problem to send data from Arduino to the PC. At first I thought I did a mistake at the serial-read or event function in visual basic. But now I figured out, that the Arduino doesn't send data, if I activate the com-port from my VB-program. However, if I use the standard Arduino serial monitor, I get sent data and the TX LED is blinking. If I'm using my VB script, I can't get a blinking LED, however, the communication in the other direction works well. For example I can send data to the Arduino and the RX LED blinks.

Now the question: Is there any function, I have activate to get the Arduino in a sending mode. I could imagine, It could something have to do with “handshaking”???


Thanks for the help.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 316
Posts: 35593
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The Leonardo requires that the DtrEnable flag be true. Are you setting it?
Logged

Magdeburg
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No!
I'll test it in the evening.

Thank you.
Logged

Magdeburg
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

works perfectly,

mille grazie!
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 316
Posts: 35593
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For future reference, perhaps you could post your VB code for opening the port.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If I try to use a Terminal program with an Arduino Uno (R3 SMD) under windows 7, I get the message: "The port is not available".

However, when I use the Monitor Serial, I don't get the error and all the data flow fine, so nothing is locking the port....is this the same issue?

Thank you
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 316
Posts: 35593
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
is this the same issue?
No.

Quote
However, when I use the Monitor Serial, I don't get the error and all the data flow fine, so nothing is locking the port
You aren't trying to use the Terminal program at the same time as the Serial Monitor, are you? Have you closed the IDE?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
is this the same issue?
No.

Quote
However, when I use the Monitor Serial, I don't get the error and all the data flow fine, so nothing is locking the port
You aren't trying to use the Terminal program at the same time as the Serial Monitor, are you? Have you closed the IDE?

Yes, of course I have tried to connect via Terminal after closing the IDE.
It happens the same to me, when using the programming port with the Arduino Due, I can only connect to the Native USB.

What is it then?

Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 316
Posts: 35593
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
It happens the same to me, when using the programming port with the Arduino Due, I can only connect to the Native USB.
That would be logical. The programming port is for, well, programming the Arduino. You aren't programming the Arduino from the Terminal application, are you?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
It happens the same to me, when using the programming port with the Arduino Due, I can only connect to the Native USB.
That would be logical. The programming port is for, well, programming the Arduino. You aren't programming the Arduino from the Terminal application, are you?

I am not, but wouldn't I be able to communicate to Arduino Uno via Serial.print() and Serial.read() commands?

I don't understand why the port is not available when I try to open it from another program different from Serial Monitor (which is supposed to be the same).
Logged

0
Offline Offline
Tesla Member
***
Karma: 51
Posts: 6592
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
communication between my PC and a Leonardo

Just from looking at other code, the leonardo has some special requirements as to its serial port. probably nothing to do with the comport issue on your pc, but there is something different. If you are using windows, have you looked in device manager at the comport settings for different comports and such? 
Logged

Why I like my 2005 rio yellow Honda S2000 with the top down, and more!
GOOGLE ADVANCED FORUM SEARCH BELOW!  
Go to:  http://www.google.com/advanced_search?hl=en
put in key search words,
use site or domain:  http://arduino.cc/forum
or in a google search box put key words site:http://arduino.cc/forum

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 316
Posts: 35593
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
the leonardo has some special requirements as to its serial port.
The only difference is that DtrEnable must be set to true.
Logged

Pages: [1]   Go Up
Print
 
Jump to: