Espigah / as3-arduino-connector

Automatically exported from code.google.com/p/as3-arduino-connector
0 stars 0 forks source link

com1 claims to be an arduino but it is not. Looking for an arduino test. #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. myArduino = new Arduino(port1, 57600);

What is the expected output? What do you see instead?
I successfully connect to an 'arduino' at port1 but there is no arduino at port 
1. 

What version of the product are you using? On what operating system?
Latest as of today 24.9.12

Please provide any additional information below.
Hi, I'm creating some code to iterate over the available ports if the user does 
not provide a com port for the arduino. Not sure why but my computer thinks 
COM1 is an Arduino (in actual fact, it's at COM9). I would love there to be a 
test one could use to determine if indeed it is an arduino at that port.  
myArduino.readByte() crashes the Flashbuilder when I try it with com1. I don't 
think the other available methods can let me know if there is an arduino there 
either. getFirmwareVersion() is not working for my Arduino at com9 - I think 
this is because I'm using a clone I bought of ebay (I thus cannot use this as a 
test of 'there is an arduino there').  Thanks :)
Andy.

Awesome ANE of your btw :)  I must learn how to make these!

Original issue reported on code.google.com by andytwo...@gmail.com on 24 Sep 2012 at 10:30

GoogleCodeExporter commented 9 years ago
Curiously, in a for loop going through all available com ports in search of an 
arduino, using arduino.close() instead of arduino.dispose I get random crashes 
between 1 and 10 seconds once the port with the arduino that is found.  I'm 
sure this is becuase I've got multiple instances of the ANE backend code 
circulating around as I have not closed previous incantations properly.   

Anyway, thought to log this in case it helps a fellow googler. 

There may be some link between this and issue 8?  Peeeerhaps anyway!

Original comment by andytwo...@gmail.com on 24 Sep 2012 at 3:04

GoogleCodeExporter commented 9 years ago
On Windows, there is really no good way to determine what is a valid Arduino... 
  You can try to open the port, and see if portOpen() returns true.  If it does 
not, that means that it couldn't be...  You shouldn't write to the port unless 
it's been checked by portOpen() or it will crash....

I've taken a look at the code within the Arduino Studio to see what they are 
doing to sense Arduinos -- but they rely too heavily on some Java calls that I 
don't think I can get away with and still make it cross platform.

As far as comment 1, there is a recycle period where the memory space is still 
in use.  I don't know how to do a good scan of it.... 

Original comment by Nicholas...@gmail.com on 12 Nov 2012 at 11:22

GoogleCodeExporter commented 9 years ago

Original comment by Nicholas...@gmail.com on 23 Apr 2013 at 3:25