Magdeburg
Offline
Newbie
Karma: 0
Posts: 5
|
 |
« on: February 26, 2013, 04:29:54 pm » |
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
Brattain Member
Karma: 311
Posts: 35470
Seattle, WA USA
|
 |
« Reply #1 on: February 26, 2013, 06:44:50 pm » |
The Leonardo requires that the DtrEnable flag be true. Are you setting it?
|
|
|
|
|
Logged
|
|
|
|
|
Magdeburg
Offline
Newbie
Karma: 0
Posts: 5
|
 |
« Reply #2 on: February 27, 2013, 03:18:22 am » |
No! I'll test it in the evening.
Thank you.
|
|
|
|
|
Logged
|
|
|
|
|
Magdeburg
Offline
Newbie
Karma: 0
Posts: 5
|
 |
« Reply #3 on: February 27, 2013, 10:47:59 am » |
works perfectly,
mille grazie!
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA USA
Offline
Brattain Member
Karma: 311
Posts: 35470
Seattle, WA USA
|
 |
« Reply #4 on: February 27, 2013, 02:00:06 pm » |
For future reference, perhaps you could post your VB code for opening the port.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 14
|
 |
« Reply #5 on: February 27, 2013, 07:14:24 pm » |
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
Brattain Member
Karma: 311
Posts: 35470
Seattle, WA USA
|
 |
« Reply #6 on: February 28, 2013, 06:33:04 am » |
is this the same issue? No. 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
Newbie
Karma: 0
Posts: 14
|
 |
« Reply #7 on: February 28, 2013, 06:37:55 am » |
is this the same issue? No. 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
Brattain Member
Karma: 311
Posts: 35470
Seattle, WA USA
|
 |
« Reply #8 on: February 28, 2013, 06:54:43 am » |
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
Newbie
Karma: 0
Posts: 14
|
 |
« Reply #9 on: February 28, 2013, 06:58:15 am » |
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
Tesla Member
Karma: 50
Posts: 6532
Arduino rocks
|
 |
« Reply #10 on: February 28, 2013, 09:36:15 pm » |
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
|
|
|
|
|
Seattle, WA USA
Offline
Brattain Member
Karma: 311
Posts: 35470
Seattle, WA USA
|
 |
« Reply #11 on: March 01, 2013, 01:27:17 am » |
the leonardo has some special requirements as to its serial port. The only difference is that DtrEnable must be set to true.
|
|
|
|
|
Logged
|
|
|
|
|
|