access serial port from sikuli

Asked by Ian Adams

Hello,
I am trying to use pymcu which is a microcontroller board that can be programmed via python scripting. Here is a link to an overview of the board:
http://www.pymcu.com/overview.html
The board comes with a module titled pymcu and when I attempt to import this module I get the following error message:
ImportError: No java communications api implementation found.
I realize this is not a sikuli issue but more likely an issue with the java communications API installation. I have installed the java communications api in accordance with the instructions I found here:
http://edn.embarcadero.com/article/31915
but I still get the ImportError.
Has anyone successfully accessed the serial ports from sikuli. If so, how is this done? Please help if you can, I think it would be a great asset to sikuli if it could be used to read/write the serial port and thus talk to the pymcu board which would allow automation of digital I/O testing.

Thank you.

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

reading the installation instructions for pymcu, it seems that it needs C-Python 2.7.3

Sikuli runs with Jython, which can only import modules, that are completely written in Python language or specially adapted for the use with Jython. Moreover the current Jython is on language level 2.5

To use the Java communication API, you should step down to the Java level, though it is principally possible, to use it from Jython scripts too (since everything written in Java and available on class path can be used in Jython scripts).

In any case, I would recommend to use a IDE like Eclipse or NetBeans (either for Java or Python development), to have all options of a full featured IDE.
When using version 1.0.1:
https://github.com/RaiMan/SikuliX-API/wiki/Usage-in-Java-programming
This approach can be combined with the Sikuli IDE for the image management .

Can you help with this problem?

Provide an answer of your own, or ask Ian Adams for more information if necessary.

To post a message you must log in.