Message Boards Message Boards


Connecting Lego Mindstorm EV3

Posted 3 years ago
4 Replies
0 Total Likes

Numerous information on the communication with the Lego Mindstorms brick can be found on the internet using the SerialOI packages and the Math4NXT by Denis Cousineau. It is however very difficult to find information/guides to the new Connected devices in Mathematica 10, unless you are dealing with an arduino or a raspberry pi. On Wolfram connected devices project the sensors of the Lego windstorm EV3 brick can be found, however the database provides no information on how the connection and communication is actually conducted.

Replacing DeviceOpen, DeviceRead and DeviceWrite with the old SerialOpen, SerialRead and SerialWrite is unsuccessful.

Do anyone have experience with the connection of the Lego Mindstorms brick in Mathematica 10 or can anyone provide information on how to use the very limited information on to connected and communicate with a given device?



4 Replies
Posted 3 years ago

Hi Simon,

I have some basic Mathematica code which can drive an EV3 lego robot over the bluetooth connection, ie control motors and read sensors etc.

The code is used in an internal project of mine:

Youtube video

It uses the Serial IO package to stream commands to and from the EV3 brick.

Please feel free to get in contact, my email address is julian.w.francis @

The code is a bit hacky, and good do with some improvements, but it does work.

Kind regards, Julian

Dear Simon,

Have you been successful with your project to connect EV3 and Mathematica?

THX and best regards,


Posted 9 months ago

Dear Joachim,

Mathematica EV3 code

You might find the above code useful. From memory, using a previous version of this on my PC was quite tricky. However, I have used the above on my Macbook Air (using Mathematica 11.2). It was pretty straightforward,

just run the package, and eg in a new notebook type:


EV3StartMotor[ EV3PortB, 50 ]

Feel free to let me know if you have any difficulties.

Kind regards, Julian.

Dear Julian,

THX for this link, which I haven't known before.

I will try this out later this week and will report about progress!

Best regards,


Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract