Installing Pybricks on LEGO MINDSTORMS EV3
This page guides you through the steps to collect and install everything you need to start programming the EV3. Use the menu on the left to navigate the instructions for using the EV3 brick and to run programs.
Note ⸺ Pybricks for MINDSTORMS EV3 uses Pybricks version 2.0, while newer hubs like SPIKE, Technic, and MINDSTORMS Inventor use Pybricks 3.0 or higher. This means you can only code your EV3 with MicroPython in Visual Studio Code. The simpler online interface with block-based coding is not available for EV3. If you would like to see continued EV3 support, including block-based coding in our web app, please let us know on our forum. If we can find enough teachers and developers who want to get involved, perhaps we can make this happen.
What do you need?
To get started, you’ll need:
- A Windows 10 or Mac OS computer.
- During installation: Internet and administrator access.
- A microSD card: You’ll need a card with a minimum capacity of 4GB and a maximum capacity of 32GB. This type of microSD card is also known as microSDHC. We recommend cards with Application Performance Class A1.
- A microSD card slot or microSD card reader.
- A mini-USB cable, like the one included with your EV3 set.
The typical configuration of this equipment is shown below:
Preparing your computer
You’ll write your MicroPython programs using Visual Studio Code. Follow the steps below to download and install it:
- Download Visual Studio Code.
- Follow the on-screen instructions to install it.
- Launch Visual Studio Code.
- Open the extensions tab.
- Install the EV3 MicroPython extension as shown below.
Preparing the microSD card
Next, you’ll install the required tools on your microSD card.
If the microSD card contains files you want to keep, make sure to create a backup of its contents first. Click here to learn how to backup your previous MicroPython programs if necessary.
This process erases everything on your microSD card, including any previous MicroPython programs on it.
To install the MicroPython tools on your microSD card:
- Download the EV3 MicroPython microSD card image and save it in a convenient location. This file is approximately 360 MB. You do not need to unzip the file.
- Download and install a microSD card flashing tool such as Etcher.
- Insert the microSD card into your computer or card reader.
-
Launch the flashing tool and follow the steps on your screen to install the file you have just downloaded. If you use Etcher, you can follow the instructions below, as shown below:
- Select the EV3 MicroPython microSD card image file you have just downloaded.
- Select your microSD card. Make sure that the device and size correspond to your microSD card.
- Start the flashing process. This may take several minutes. Do not remove the card until the flashing process is complete.
Updating the microSD card
To update the microSD card, download a new image file using the link above and flash it to the microSD card as described above. Be sure to back up any MicroPython programs you want to save.
You do not need to erase the contents of the microSD card first. This is done automatically when you flash the new image file.