[ev3dev × Python] Build ev3dev development environment
This article is for anyone who wants to work with ev3 in Python.
This time we will prepare to run ev3 using VS Code.
table of contents
- Overview
- What to prepare
- SD card preparation
- Preparation of bluetooth
- VS Code preparation
0. Overview
** Use ev3dev to run a Lego robot (ev3). ** **
** Create and run Python programs with VS Code. ** **
◯ ** ev3dev **: A system for running ev3. Official Site
◯ ** VS Code **: Abbreviation for Visual Studio Code. Where to make a program (editor).
◯ ** Python **: One of the programming languages. It is simple and easy to read.
1. What to prepare
◯ev3
◯ PC
◯bluetooth
◯ microSD or microSDHC (within 32GB) and adapter
- Unlike the description on the official website, it has been confirmed that it works normally even with a 64GB microSDXC.
2. Preparation of microSD
1. Download the image file from the link below
Image file (zip file Leave)
2. Download and install Etcher from the link below
Etcher download page
3. Flash microSD with Etcher

4. When the flash is finished, insert the microSD into the intelligent block and turn it on.
3. Preparation of bluetooth
- Although the explanation is given on Windows from here, what you do on Mac is the same.
1. Turn on the bluetooth setting of your computer

2. Through Wireless and Networks

3. Press Bluetooth

4. Check both Powered and visible (make both rectangles in the frame black)

5. Press Start Scan to find your computer

6. Check your computer

7. Press Network Connection

8. Connect ev3 to your computer

9. Press connect

10. Check if it is connected

- If not, press connect again
3. VS Code preparation
1. Download and install VS Code from the link below
VS Code download page
Let's download it according to your computer! (Here it is Windows)

2. Make VS Code Japanese
Search, install and restart!

3. Install ev3dev browser

4. Create a new folder
Create a new folder for ev3dev!



5. Create a new file
Let's treat it as a Python file like program name .py!

6. Connect VS Code and ev3
Find your ev3! When it turns green, it means that you are connected!
If it doesn't come out here, let's reconfirm bluetooth!


7. Change the line feed setting (Windows only)
Let's change the line feed setting from CRLF to ** LF **!

8. Download the program
Every time you make a program, press the download button to download it!

9. Program execution
Right-click on the program file you want to run and press Run!

Finally
Thank you for reading! !!
I want to move it from the next time!
I want to make a better article
◯ This is easier to understand
◯ This is difficult to understand
◯ This is wrong
◯ I want you to explain more here
We appreciate your opinions and suggestions.