Introduction‎ > ‎

Why EV3 Python?

The Lego EV3 robot usually runs an operating system known as EV3-G in which programs are created using an icon-based method rather like Scratch. This way of programming has advantages and disadvantages:

  • Plugging blocks together means less typing so less risk of spelling and syntax (grammar) errors
  • The visual nature of the icons makes the programming clearer to non-English speakers than a textual programming language based on English would be
  • Some people may find the visual layout of loops etc to be clearer than a textual program would be
  • Professional programmers use textual programming so learning EV3-G is not the best way to prepare for a career in professional programming (also called coding)
  • Programs made with the icon-based EV3-G programming system may run more slowly than programs made with textual programming languages
  • The EV3-G system makes available a limited set of functions - additional functions will usually be available in a textual programming language
In any case, the standard method of programming the EV3 is to use the built-in programming system, EV3-G, so it certainly makes sense to master that before considering moving on to textual programming. Once a good level of mastery of EV3-G has been achieved it makes sense for motivated users to want to use textual programming to program their robot, and there are several options available:

EV3 Basic
I am convinced that the EV3 textual programming language that is the most easy to install and to learn is EV3 Basic. I have spent hundreds of hours working with EV3 Basic and like it so much that I made a website to promote it: Basic was originally designed for beginners but evolved over the years into a sophisticated form called Microsoft Visual Basic that is less easy for beginners to learn. Fortunately Microsoft recognised this problem and released in 2008 a version of Basic that is once again simple and easy to learn: Microsoft Small Basic. Small Basic is designed to appeal to young people, with an emphasis on games and graphics. Adding the 'EV3 extension' converts Small Basic into EV3 Basic and allows it to work with the EV3 robot. Basic was one of the first programming languages to be created and some people feel that it has become outdated and that beginners should learn a more modern language. But Basic has always been very popular and even today (October 2016) Visual Basic.Net and its older variant Visual Basic are among the most popular programming languages in the world - see for yourself at which tracks the popularity of more than 100 languages. In fact if you lump together the two main kinds of Basic (Visual Basic and Visual then we can say Basic is about as popular as the Python language (October 2016)! Another reason to consider using EV3 Basic is that it is easier to install than other EV3 textual programming languages since it works directly with the unmodified EV3 brick whereas other textual languages require you either to modify the brick's firmware or prepare a microSD card that will contain an alternative operating system that will be used in place of the brick's firmware. Note that EV3 Basic runs only on Windows computers.

Python is a modern, very powerful programming language that is concise, legible and thus easier to learn than most others such as C++ or Java and is therefore very popular in schools and universities. One thing that helps to make it easy to learn is that an advanced, rather difficult feature called 'object oriented programming' (OOP) is available but is not obligatory, so you can avoid it initially and then start using it when you're ready. See this article Why Python might just be all you need.

LeJos allows you to use the Java programming language to program the EV3. Java is currently the most popular programming language in the world but is much more difficult to learn than Basic or Python so it is probably a good choice only for the most-motivated learners. Less well motivated learners could be put off programming forever by Java! Having said that, some people feel that although it is easier to write simple programs in Python, it is easier to write complex programs in Java! Join the discussion.

ROS (Robot Operating System) is specifically designed for robots. However, it is significantly harder to learn than EV3 Python or EV3 Basic. See HERE and HERE.

Other languages
Other textual programming languages can be used to program the EV3, such as C++ (running on the EV3dev operating system) but C++ is also much more difficult to learn than Python.

Conclusion: if you are looking for the easiest possible way to try programming the EV3 textually and don't intend to pursue a career in coding then I encourage you to visit and consider trying EV3 Basic. If you want to use a more modern programming language, perhaps with the intention of becoming a professional programmer one day, then I recommend you use EV3 Python. If this is indeed your choice then your next step is to install EV3Dev and EV3 Python.

There are hundreds of programming languages out there and the following video places Python in fourth place "for jobs, for money, for building new things". The author, a software developer, puts Java, Java Script and C# (C Sharp) ahead of Python. But I've read that Java is so verbose that a Java program might be 3 or 4 times longer than a Python program that does the same thing!