Go Down

Topic: USB communication with Leonardo (Read 12989 times) previous topic - next topic

dwyer2bp

I'm with grumpy Mike, when I plug more than one arduino In (not at the same time) they are auto assigned different port numbers...I'm guessing your uno gets a different port number than the Leo right?

dhering


I'm with grumpy Mike, when I plug more than one arduino In (not at the same time) they are auto assigned different port numbers...I'm guessing your uno gets a different port number than the Leo right?


Yes, it does.

dwyer2bp

#17
Jun 21, 2012, 05:59 pm Last Edit: Jun 21, 2012, 06:03 pm by johnnyonthespot Reason: 1
And you update your processing code with the COM port assigned to the LEO when trying to communicate to the LEO, correct?

Code: [Select]

myPort = new Serial(this, Serial.list()[0], 9600);  // Define the serial port we are using


I believe this line (in processing) assigns 'myport' to the first available serial port. I'm wondering if the correct port is getting assigned for the Leo; for example, say you have both boards plugged in at the same time, the one with the lower com# would be assigned to myport every time.

dhering

I could see that happening if I had two boards connected at the same time.  I only have the Leonardo connected when I have the problem.  For now I am using the UNO again for our project, which works fine.

Thanks!

Jantje

It looks like I have the same problem in my eclipse plugin.
I have been modifying my eclipse plugin to work with Leonardo. I got the compile to work, I got the upload to work. But now the serial monitor seems to fail.

On my system the Leonardo always identifies itself as COM15. The port to upload is always COM16.
if I use the Arduino serial monitor on COM15 it works fine. (I get the writings from the Arduino sketch below)
If I use my serial monitor on COM15 nothing is received.

The code I'm running on Arduino is
Code: [Select]
//The setup function is called once at startup of the sketch
void setup()
{
// Add your initialization code here
Serial.begin(57600);
while (! Serial);
}

// The loop function is called in an endless loop
void loop()
{
//Add your repeated code here
static int count;
Serial.print("eclipse leonardo: ");
Serial.println(count++);
delay(100);
}

The code in eclipse is huge so if interested look in https://github.com/jantje/arduino-eclipse-plugin

I haven't tried sending data to Leonardo but I do not receive any serial output from the Leonardo in my plugin.
I've tested with my mega and everything works fine there. There must be a difference between the Leonardo and other Arduino boards.
Anyone has a clue?

Best regards
Jantje

I'm using Windows7 64 bit with 64 bit Java
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

pylon

Sounds to me like a windows driver problem. On Linux everything works fine, I have no changing device names so I tend to believe that the Arduino part is not the problem.

Jantje

I did some more testing and I completely fail to understand what is going on.
All actions below are on COM15 on windows7 64 bit
I used the serial monitor of Arduino IDE 23 => works fine (so no code change in the serial monitor is needed since 23)
I connect my serial monitor then I try to use Arduino IDE monitor (any version) and I get a port in use error => My serial monitor connects to the right port

When I run my VM ware windows xp
The com port is COM12 and COM11 for upload.
Here it works fine with te same code

Any ideas are welcome
Best regards
Jantje
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Jantje

I did some more tests.
I installed a 32 bit eclipse in my windows 7 OS with my plugin. It works there.
So I would conclude there is a windows driver issue when running 64 bit applications.
Best regards
Jantje
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

cantore

I have exactly the same problem on windows 7 32bit. With arduino 2009, UNO and Mega everything is fine but with leonardo no way to communicate with processing... Leonardo receives packets from processing but processing not from leonardo. The strange thing is that if I open a serial terminal, I can see packets from leonardo without problems...

Jantje

cantore
Are you running a 32 or 64 bit version of processing
Best regards
Jantje
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

westfw

Um, you know that you can't run the serial monitor, a terminal emulator, and a processing app on the same serial port all at the same Time, right?  Only one program can access the port properly.  It Might appear to work , but only one app will get the data!

cantore


  Only one program can access the port properly. 

of course!

Quote
Are you running a 32 or 64 bit version of processing?

How can I know if it is the right version? I took the installation files here:
http://processing.googlecode.com/files/processing-1.5.1-windows-expert.zip
but it is not specified if it is only for 64, 32 or for both win versions.
thanks

Jantje

cantore
you can see whether a program is 32 bit or 64 bit by looking at the "task manager"
In the processes tab the name is marked with 32 when it is a 32 bit app.
To identify your application sort on the description field.

Greetings from Belgium.
Jantje
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

cantore

My os and my processing version are 32bit.

Jantje

Cantore
I only have problems with 64 bit applications
It is clear you have another problem.
I must say that I like the looks of Leonardo, I like the fact the big USB port is gone, but when I want to be sure it work i use the diemilenove or mega (I do not own a UNO)
The fact the com port disappears and the windows behavior around that makes it error prone.
FI have a serial monitor running connected to leonardo; reset leonardo => serial com goes away, upload com appears and disappears, serial com tries to appear,   but com can not come back (in windows) as it is in use by the serial monitor.
Solution=> disconnect monitor + reset Leonardo.
I think the tools will need some tweeks before the Leonardo can reach the stability of the UNO.

Best regards
Jantje
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Go Up