Communication IDE <-> JavaFX

Hi,
I'm the creator of Blockly@rduino: https://github.com/technologiescollege/Blockly-at-rduino
I succedded in put it as plugin to IDE : https://github.com/technologiescollege/BlocklyArduinoIDEPlugin

But I want to create a real interaction between IDE and Blockyl@rduino.

Can I programmatically interact with IDE ?

  1. send signal to change COM port selection ? or receive COM port selected ?
  2. board choice
  3. serail console output in a web page ?

Thanks a lot.

(deleted)

I may be completely out of my depth here. It seems to me that Blockly is an alternative to the IDE so I don't understand why you would have a plugin.

You can use the IDE from the command line to compile and upload a program from any programming language. I use that with Python and I can select the board and port as needed.

...R

spycatcher2k:
Download the source code from GITHUB. You can have a look it it and see if you can work it out.

Yes, I know...I've already created a plugin to interact a little.
If I post something it's because I need help ;-D

Robin2:
I may be completely out of my depth here. It seems to me that Blockly is an alternative to the IDE so I don't understand why you would have a plugin.

It can't be an alnternative, it's "over" IDE. So for Kids, I would like them to have some information from IDE in Blockly, to make it very easy to use.

Robin2:
You can use the IDE from the command line to compile and upload a program from any programming language. I use that with Python and I can select the board and port as needed.

...R

I've done something like that (Blockly@rduino_AIO), but with Java I would like to create something more simple.

scanet:
I've done something like that (Blockly@rduino_AIO), but with Java I would like to create something more simple.

I don't understand how it could be more simple. The Java code can provide a complete interface as simple as you want to make it.

What I have done is to put some comments at the top of my .ino file that are read by my Python program - like this

// python-build-start
// action, verify
// board, arduino:avr:uno
// port, /dev/ttyACM0
// ide, 1.6.3
// python-build-end

That way the settings stay with the code

...R

The idea is to complete interaction, helping kids by doing everything from Blockly@rduino without needing reduce it. I want to select COM port from Blockly and so on the IDE beneath it ; as well as card choice and comiling information.

I tried to understand source code, but it's huge :astonished: , and not well documented.

scanet:
The idea is to complete interaction, helping kids by doing everything from Blockly@rduino without needing reduce it. I want to select COM port from Blockly and so on the IDE beneath it ; as well as card choice and comiling information.

As far as I can tell that is exactly what I do with my Python program. There was no need to examine the Arduino IDE source code. My python program formulates a command for the IDE and calls the operating system to execute it.

The documentation I relied on is here

...R

Thanks for your answer, but I've already done this thing, with a Python server which "catch" the command line and execute it.

But what I would like to do is :

  • get COM port list from IDE and construct this list in web page
  • select a board from webpage and thi slection select card in IDE

And as I launch webpage in JavaFx from IDE, I use Java interaction.
Thanks.

I have no idea how to do what you want.

Considering that the IDE will have got the list of COM ports from the operating system I don't see what disadvantage it would be if your Java program did the same thing.

...R