Need help in communication btwn Arduino and MRL

Hey Friends,

Since a few days I have been exploring MRL and I want to use it for my project which is similar to a Chess Robot made with MRL.

I wil be having an Arduino Mega connected to the PC.

I plan the communication to happen as follows:

Arduino Board > (serial communication) > Chess Engine in MRL

Chess Engine in MRL > (serial communication) > Arduino Board

(the data being sent/received will be chess moves)

I was thinking of using a small python script  which will act as a COM port listener and send any incoming data to the chess engine on MRL and vice versa.

But im not sure of the Python version used in MRL and also, is it possible to install external libraries (eg: pySerial) for use with MRL.

*I wont be using the Arduino service because I have already written a code for the external hardware on arduino IDE.

Kindly help/advice me on how I can establish communication.



GroG's picture

Hello and Welcome mehtaatur

Hello and Welcome mehtaatur !

It sounds like a great project.

In regards to the Python extentions, I don't think we have been able to load addition libraries, but you should ask Alessandruino to be sure - his Script-Fu is very strong.

Your ideas all seem very sound and well thought out.

My first suggestion would be to use the Serial service.   It would be perfect !  BUT - The Serial service is BRAND NEW !  .. and NO ONE has tested it yet !!!  :D

And I'm pretty sure it doesn't work ... because nothing works the very first time (except IC2 - but that was an anomaly).

In order to test I will need 1 computer with 2 Arduinos, or 2 computers with a null modem cable.. I tried looking around for virtual serial port emulator - but all the software I found did not seem to work correctly.

If you have ideas, experience or suggestions on how to get some sort of test-bed together we should be able to get the Serial service working quickly and effeciently !

P.S. change your avatar mehtaatur ... don't be scared gopher ! :)

mehtaatur's picture

Serial Service sounds gr8 !!!

Hey GroG,

The serial service seems to be the perfect service for my application!!! :D

- But I double checked, in the version that i am using v1543, I did not find the serial service (Maybe its still in Beta and you havent launched it )

- and regarding the testing, I have 2 arduino's and if you want then I could help you in the testing if you are fine with it.


Alessandruino's picture

Hi mehtaatur and welcome...I

Hi mehtaatur and welcome...

I 've just added Serial Service to the MRL services list....

Now you should be able to see it...If you don't see it, delete serviceData.xml file in your .myrobotlab folder, and restart MRL...It will automagically appear :D

Now we are testing it :D


mehtaatur's picture

Thanks for the Serial Update :)

hey alessandruino,

thanks for updating mrl with the serial service, will be testing it as soon as i reach home. :D

was just wondering, since grog said that it was under testing, does the serial service which has been added by you work fully or are you still facing any bugs problems?

Could I help in testing and improving it?


kmcgerald's picture

Willing test subject

I too have a handful of Arduino boards I could throw at testing the serial service.  Not that it would likely matter but I have several different types too. Uno, Leo, Mega, Pro Micro, and even a Teensy.

GroG's picture

Wow it's great everyone wants

Wow it's great everyone wants to help !

It really makes these things easier and BETTER FASTER STRONGER !!!

I believe Alessandruino updated mrl, making the Serial service available through the gui.

I managed to test on Linux a virtual null modem cable

Detailed report here -

@methtaahur, do you have an Arduino attached to a robotic arm ?   Or do you still need to build this arm?  Do  have an existing sketch on the Arduino which can recieve and react from serial input?  What's next?

mehtaatur's picture

Hey GroG, regarding robotic

Hey GroG,

regarding robotic arm, actually since my use is with the chess game, I have stepper motors controlled by the arduino instead of an arm :P

based on the string data received from MRL chess engine the arduino will decode it and move to stepper motors (X and Y cordinates)

I have written a sketch for controlling the motors (using external arduino libraries) and as per the string received from serial port, they will make movements.