Go Down

Topic: how to read port names for an additional tool ? (Read 113 times) previous topic - next topic

palary18

Hello

I'm working on a tool (ArduBlock) which give a graphical programming environment for arduino.
I would like to display these informations on the JFrame of this tool :
  • the name of the selected board
  • the name of the selected serial port


It's OK for the name of the selected board : an itemStateChanged listener on the board menu does the job.
But this method has no effect with the serial port menu. I can create a listener, i can get it, but it haven't any reaction when the serial port is modified.

Somebody has an idea ?

Pierre

Robin2

Doesn't the user have to select the Serial port on the PC - and having done that won't your program know what it is ?

...R

palary18

No, the user select the serial port from the tool/serial port/COM1, COM2, ... menu of the arduino EDI.
And so i want my adding tool (ArduBlock) to detct any modification of serial port and display it.

Robin2

No, the user select the serial port from the tool/serial port/COM1, COM2, ... menu of the arduino EDI.
And so i want my adding tool (ArduBlock) to detct any modification of serial port and display it.
Can you explain more clearly what your tool is intended to do?

For example, if the User is using the Arduino IDE to connect to an Arduino board I don't see how another program can do so at the same time with the same COM serial port.

...R

palary18

My program is an addon to Arduino EDI. It is build as a tool for processing :
https://github.com/processing/processing/wiki/Tool-Basics

In the addon, this java instruction is OK for listening a board choice :
itemRB.addActionListener(this);
where itemRB is pointing to the radio buttons "arduino uno", ..., "arduino BT", ..., "arduino leonardo", ... from the board menu.

but this one don't work for listening a serial port choice :
itemCB.addActionListener(this);
where itemCB is pointing to the check boxes "COM1", "COM2", ... from the serial port menu.

You can see ardublock blog for more explanation about it.

thanks for your replies

PaulS

Quote
My program is an addon to Arduino EDI.
I'll assume that you've been taking typing lessons from Grumpy_Mike.

I guess I don't understand why your addin needs to know which com port the IDE is going to tell avrdude to send the resulting hex file to.

Robin2

My program is an addon to Arduino EDI. It is build as a tool for processing :
https://github.com/processing/processing/wiki/Tool-Basics

You can see ardublock blog for more explanation about it.
If you want help provide the necessary information here and don't expect people to go chasing about the internet to save you trouble.

...R

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!

Arduino
via Egeo 16
Torino, 10131
Italy