This document provides instructions for setting up the ev3dev operating system on a LEGO Mindstorms EV3 brick along with the Visual Studio Code IDE. The 8 step process includes downloading ev3dev, writing it to an SD card, booting the brick, installing VS Code on a computer, downloading a sample Python project, installing Python, connecting VS Code to the EV3 over USB, and running code on the brick from VS Code or directly on the brick.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
16 views14 pages
EV3Dev Intro
This document provides instructions for setting up the ev3dev operating system on a LEGO Mindstorms EV3 brick along with the Visual Studio Code IDE. The 8 step process includes downloading ev3dev, writing it to an SD card, booting the brick, installing VS Code on a computer, downloading a sample Python project, installing Python, connecting VS Code to the EV3 over USB, and running code on the brick from VS Code or directly on the brick.
What is ev3dev? ■ ev3dev is a Debian Linux-based operating system that runs on the LEGO® MINDSTORMS EV3 ■ ev3dev allows you to program in different languages (eg. Python, C++) ■ This will also cover installation of Python IDE (Integrated Development Environment) – Note that an IDE is not required to write or run ev3dev or Python code on the EV3 – While you can edit Python code in any editor, an IDE simplifies various aspects of developing and managing your code.
Step 1: Download ev3dev ■ Download the latest version of EV3dev for EV3: https://www.ev3dev.org/downloads/ ■ Download ev3dev-stretch beta as that is what is needed for usage with the IDE – For a detailed explanation of the differences between ev3dev-jessie and ev3dev-stretch, see the next slide ■ Remember where you downloaded the file
ev3dev-jessie vs. ev3dev-stretch ■ ev3dev-jessie: – Programs (and motors, sound, etc.) don't stop when you press the back button (unless you write your program in such a way that it does this, which is not exactly easy to do right) – Doesn't work with VS Code extension – Battery monitor does not automatically turn off the brick to prevent battery damage ■ ev3dev-stretch: – Programs (and motors, sound, etc.) should stop when you press the back button. – Does work with VS Code extension. – Battery monitor automatically turns of brick when it reaches too low a voltage – ev3dev2 python package is available, which is easier to use (e.g. it has move steering/move tank type functions) ■ Stretch is recommended for FIRST LEGO League teams because of the support for the IDE and the ev3dev2 library
Step 2: Write Image (Windows, Mac, Linux) ■ If you have a favorite tool writing images to SD cards – use that. Otherwise, we recommend that you download and install Etcher: https://etcher.io/ for your OS ■ Select the downloaded file for writing ■ Insert the Micro SD card into the computer ■ Write to your SD card (in device dropdown)
Step 3: Boot ev3dev ■ Put the SD Card in your EV3 and power it on. ■ At first, you will see the MINDSTORMS boot screen and the red LEDs will be on. This is immediately followed by the ev3dev boot screen and the LEDs changing to orange. ■ The LED button lights on the EV3 brick will blink to indicate SD card activity. ■ Tip: The SD card can be hard to pull out. Create a little tab out of tape. (Remove tape prior to an FLL tournament.)
Step 4: Install Visual Studio Code (VSC) Download and install VSC from https://code.visualstudio.com/ for Mac, Windows, or Linux.
Step 5: Download Sample Project ■ Download and extract the following zip file: https://github.com/ev3dev/vscode- hello-python/archive/master.zip
■ Open the folder in VSC
■ You will see an alert “This workspace
has extension recommendations” → Press “Install All”. You might afterward be prompted to install pylint → click install
■ Optional: If you want software versioning
control, you can also install Git. VSC integrates with Git nicely.
Step 6: Install python 3 ■ Download and install python3 from: https://www.python.org/downloads/ ■ You won’t be running python on your desktop but the IDE setup needs this
CREDITS • This tutorial was created by Sanjay Seshan and Arvind Seshan from EV3Lessons • More lessons are available at www.ev3lessons.com • Credits: David Lechner, ev3dev.org, for the valuable feedback and information used in the ev3dev-jessie vs stretch slide
This work is licensed under a Creative Commons Attribution-
NonCommercial-ShareAlike 4.0 International License.