Getting started with LEGO MINDSTORMS Education EV3


What can you do with the LEGO robot sets?

The LEGO Mindstorms Education EV3 sets can be used in different scenarios. They offer a quick and easy introduction into robot control, motion planning and visual navigation from depth images with Python. One can assemble the robots in various ways with different sensors and motors depending on the desired task. 

For more information go to Robot LEGO Robotics EV3 Dev and to .


First of all a development set is necessary. At the chair of Cyber-Physical Systems we have five sets available for students. The implementation of the python code and connection to the EV3 can be done with Visual Studio Code and the extension LEGO MINDSTORMS EV3 MicroPython. The EV3 bricks are equipped with a micro-SD card on which the Micropython Image is installed. A more detailed installation guide is provided on GitHub.

Example - Motor control

In the following is an example python code to control a motor with the EV3. At the beginning the motor has to be initialized with the corresponding port (line 8). There are two different ways to control a motor. First, one can set a desired acceleration and target position to run the motor (line 11). Or one can set the desired acceleration and let the motor run until it is stopped by a command (line 17-23). 


If you want to get the python code or if you are interested in other example codes go to our GitHub repository or to this repository:

Simulation Tools

You may also build your LEGO robot model in a simulation tool and test your Python algorithms. Here is a list of projects:

Here is a list of 3D Modelling Tools for LEGO systems:

Building a Cyber-Physical-System (CPS)

A CPS combines the predictions or commands of computer simulations (see the section on Simulation Tools) and offers a real-time visualization of the real system and the environment. 

Such a CPS can also be developed with our LEGO Ev3 robots. Current sensor measurements can be communicated in real-time to a simulation and visualization tool via bluethooth or wifi connections. Here is a collection of relevant resources:

Leave a Reply

Your email address will not be published. Required fields are marked *