Introduction

This site, www.ev3basic.com, is the official site for tutorials on EV3 Basic i.e. Microsoft Small Basic with the the EV3 extension. The extension allows Small Basic to interact with the Lego Mindstorms EV3 robot. EV3 Basic is probably the easiest way to program the Lego EV3 robot with a textual programming language, the kind professional programmers use. Having said that, EV3 Python has become easier to set up and use over the last few months so you should decide carefully whether you should be learning EV3 Basic or EV3 Python - this page will help you decide.

This site has dozens of sample EV3 Basic programs, several helpful videos, advice on setting up Bluetooth or WiFi connections, a copy of the official EV3 Basic manual and an introduction to the companion program, EV3 Explorer. The EV3 Basic Intellisense documentation and manual are available in EnglishFrench, Spanish, German and RussianEV3 Basic works only with the EV3, so it won't work with the Lego NXT robot. EV3 Basic is compatible only with Windows PCs - if you would like to program the EV3 with a textual programming language and you have a Mac or Linux computer then I recommend you consider using EV3 Python - see ev3dev.org and my site ev3python.com.

Stop Press! A new version of Small Basic (v1.3) has recently been released (August 2017). It is likely that the current version 1.0.9 of the EV3 extension for Small Basic is NOT compatible with the new version 1.3 so if you want to use EV3 Basic you should continue to use Small Basic v1.2 until a version of the EV3 extension is released which is compatible with Small Basic v1.3. The developer of theEV3 Basic extension has determined that it will not be possible to create an EV3 Basic extension for the Windows Store version of Small Basic 1.3 but Small Basic 1.3 should also be available for manual download some time in the future and is should be possible to develop an EV3 Basic extension for that version. Small Basic 1.2 can be downloaded HERE and version 1.0.9 of the EV3 extension can be downloaded HERE. Always uninstall the old version of the extension before you install a new version.

Stop Press! David Musgrave, who runs a development and consulting business in Australia, has made a robotics portal in which you can find help with robotics fundamentals using EV3 Basic and also help using non-Lego hardware with EV3 Basic, such as the Mindsensors Sensor Multiplexer and the Mindsensors Motor Multiplexer.

Stop Press! A course on EV3 Basic is now available on Udemy.com! My Udemy course contains much of the material from this site plus many extra quizzes to reinforce your knowledge. Above all, it has a clearer pedagogical sequence than this site and includes Udemy features such as the possibility of communicating with others taking the course to get help. So if you want to learn EV3 Basic then I recommend you learn it there rather than here. The Udemy course is completely free and can be accessed HERE. Within just the first two months of launch, more than a thousand people enrolled in this course, and more than 3500 enrolled by June 2017!

Stop Press! I have made some YouTube videos to help you get started with EV3 Basic. The videos are short, with text as well as audio narration, so they can be easily used in a classroom environment. 

Stop Press! EV3 Basic has just set a new world record for the solving of a Rubik Cube by a Lego-based robot! Solving a Rubik cube as fast as possible is a good test of a robot's hardware and software and has thus become a recognised standard for judging robots. YouTube videos showing robots solving Rubik cubes have been watched more than 10 million times! The developer of EV3 Basic, Reinhard Grafl, has built a robot (running EV3 Basic and using mainly EV3 parts) which can solve randomised cubes in around 2.2 seconds, on average, smashing the existing record for a Lego-based cube solver by more than 30%!


Everyone knows that computers and robots will soon run the world... or will they? What IS a certainty is that computer programming skills are very valuable in today's high tech world. However... there is a problem. Decades ago computer programming languages were rather simple and easy to learn, but over the years these languages have evolved and become much more complex and hard to learn. Nowadays people starting to learn programming are likely to experience more frustration than fun. Recognising this problem, Microsoft created in 2008 a new, simplified version of the well-known programming language, BASIC, called Small Basic. Note that Small Basic (and therefore also EV3 Basic) runs only on Windows PCs. Small Basic is probably the simplest, easiest and most fun textual programming language, for it's possible to create fun games with this language. According to Microsoft, Small Basic 'is the only text-based programming language + tool that's made for kids'.

Another way to make programming fun is to make programs for robots, for everyone loves robots. Also, programming robots teaches you new and useful skills for you learn about how programs can interact with the real world via motors and various sensors. A key characteristic of robots and sensors is that their behaviour is somewhat unpredictable and dealing with this reality adds another dimension to the programming experience. The best robotics platform for beginners is no doubt the Lego Mindstorms system and indeed this platform has been the most popular robotics teaching system for many years. Lego has recently introduced the third generation of its Mindstorms robot, called the EV3, and this version is far more powerful than the previous version for at its heart (or more accurately, its brain) is a proper computer running the Linux operating system. Unfortunately, the Lego company only proposes an icon-based programming environment (assembling programming blocks, like in Scratch) to program the EV3 and that has a number of disadvantages:
  • Working with an icon-based programming programming environment does not prepare you well for a career in programming because almost all professional programming is done with textual programming environments (C, Java, Python etc) rather than an icon-based programming environment. For example, it's much less useful and relevant to learn about 'data wires' than it is to learn about 'parameters' and 'arguments'.
  • As your program gets more complex the graphical programming window can become crowded and unmanageable.
  • Lego's graphical programming environment fails to offer many of the features found in textual programming languages. For example, the only text operation that Lego's graphical programming environment can handle is the joining together of blocks of text. Even the way Lego's software handles variables seems clumsy compared to most textual programming languages. (It is also true that there are some functions of the standard Lego EV3 software that are not yet available in EV3 Basic.)
  • Programs developed in Lego's graphical programming environment typically do not run as fast as programs developed in a textual programming system.
So, wouldn't it be great if the fun of working with the world's easiest-to-learn textual programming language could be combined with the fun of working with Lego Mindstorms robots? Since early 2015, this is now possible, thanks to the free EV3 extension for Small Basic developed by Reinhard Grafl. The extension allows you to write Small Basic programs that can interact with the EV3's motors, sensors, speaker, screen and buttons. Better yet, the programs can be run on the EV3 simply by clicking the 'Run' button in Small Basic, as long as the EV3 is connected to the PC with a USB cable or Bluetooth or Wifi. It's not even necessary to download your program into the EV3's memory storage, though you can do that if you want to using the separate 'EV3 Explorer' program and this is fact the recommended way of working if you are using a wireless connection. Another advantage of using EV3 Basic is that it allows you to write programs that could not be made using the standard Lego programming interface, such as the second program on this page. The icing on the cake? EV3 Basic does not require you to prepare a special 'bootable SD card' or to modify the EV3's firmware - it works with the unmodified EV3 brick! Let's be clear: EV3 Basic is probably the easiest way to learn to program the Lego EV3 robot with a textual programming language!

So what does the EV3 Basic graphical user interface look like? Here is a sample program that would make a robot move forwards until the ultrasonic sensor detects that an object is less than 80mm away, then the robot plays a tone and displays a message on its LCD screen for 2 seconds. Notice how simple the interface is, with very few items in the toolbar:


Note that the insertion point is in the word 'Start' (in line 7) and that Small Basic is displaying helpful hints on the use of that function.

Click HERE to read more about Microsoft Small Basic and learn how to install it on your computer free of charge. 
Subpages (1): Basic or Python?
Comments