Basic Starter ev3dev + Visual Studio Code + Python
This is a git repository to help you get started programming an EV3 robot using ev3dev in Visual Studio Code using the Python programming language.
- Download Etcher
- download ev3dev image from https://www.ev3dev.org/downloads/
- write image onto SD card using etcher.
- insert into ev3, and restart EV3. you should see 'brickman' when it boots
-
Download and install python 3 https://www.python.org/downloads/release/python-374/ Use advanced options to add it to your path
-
install python-ev3dev libraries using a command prompt
C:\Users\dcowden>python Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> quit() C:\Users\dcowden>pip install python-ev3dev2 Requirement already satisfied: python-ev3dev2 in c:\users\dcowden\appdata\local\programs\python\python37\lib\site-packages (2.0.0b3) Requirement already satisfied: Pillow in c:\users\dcowden\appdata\local\programs\python\python37\lib\site-packages (from python-ev3dev2) (6.1.0) You are using pip version 19.0.3, however version 19.2.2 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command. C:\Users\dcowden>python Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import ev3dev2 >>> quit()
-
Download and install vscode. Use the user installer https://code.visualstudio.com/download
-
Download this project and unzip it to your computer
-
Open it using vscode Open Folder
-
Install the extensions recommended by the starter project: python and ev3d-browser
-
Connect the ev3 via USB
-
in the ev3dev device brower, connect to the brick. it should diplay a green circle when ready.
-
Press f5 to compile and run on the brick!