STEAM DISCOVERY LAB
  • About
  • Tools
  • Projects
  • Resources
  • About
  • Tools
  • Projects
  • Resources
Search

EV3 + Python

This content is adapted from Dr. E's Lab

Python IDE Intro
Steps for Using the Python IDE on the EV3 with WiFi on Tufts-Wireless Network:
  • With EV3 off, insert the SD-Card and the WiFi Dongle
  • Start the EV3, and let it boot into Linux
  • Go to Network Settings, and make sure the WiFi Dongle is "Powered"
  • Search for Networks; select "Tufts-Wireless" network
  • If connection fails, un-power WiFi Dongle, unplug, plug-back in, and re-power
    • (Make sure your computer is also on the Tufts-Wireless Network.)
  • Once connected to network, go back to main menu and go to File Browse
  • Find and run (click on) the "RunIDE.sh" script
    • This will start a web server on the EV3 brick, and load the proper files. This TAKES A LONG TIME. Give it time. Once it loads, it'll go back to the main File Browse screen.
  • On your computer (on the same network), open up Chrome Browser, and go to the IP address listed on the top of the EV3 Brick's screen
    • The EZ3IDE (the web-based Python IDE) should load in the browser
  • On the left is a file browser that lets you browse folders/files on the EV3, create new folders/files, etc.
    • Clicking on a file will open it in the IDE for you to edit. You can "save," "run," etc from the buttons in the top right.
Here is a video (5 minutes, 30 seconds) showing this process:

Notes:
  • This environment is being served up by the EV3 brick and the files are stored on the EV3 brick. The brick is NOT a powerful processor, and thus things are slow, take a long time, etc. Be patient.
  • If running a program (e.g. some python code), do NOT close the tab (or close the entire browser window). You need the "stop button" in the top right in order to "stop" the program.
  • If you DO get stuck and something isn't working, hold the "back button" on the EV3 brick, and this will "kill everything" (your running program, the web server, the IDE, communication, etc). Once it has stopped, you'll have to re-start the server/IDE (e.g. go to File Browser and find/run the "RunIDE.py" script. Remember, this takes a long time to restart, so you want to avoid this if possible.
    • If the brick is "frozen" and not responding to anything, you might have to restart the brick. Hold the back button + left button + center button all that the same time for 3 or 4 seconds until the brick reboots.
  • Once you are done with a session, be sure to properly shut down the brick (hit back button until you return to main screen, and one more time to bring up "Power Off" dialog) in order to be sure all files are saved properly. If you have important code, make sure to download and save to your local computer so you have backups/copies.  (If you right-click and download a folder, it should zip it up and download the zip file to your desktop.)

Using Bluetooth Connection:
Note that it's possible to use a Bluetooth connection from the EV3 brick directly to your computer (and not use the WiFi Dongle or the Tufts-Wireless WiFi network). Here are the Bluetooth instructions for connecting an EV3 brick running ev3dev to your computer:
http://www.ev3dev.org/docs/tutorials/connecting-to-the-internet-via-bluetooth/

Once the Bluetooth connection has been made and the internet shared, and the EV3 has been assigned an IP address (in the top left), you can then find/run the "RunIDE.sh" server as instructed above, and then go to the IP in your Chrome browser and load the EZ3IDE following the same procedure.

​
Updating The IDE
​
Periodically we may issue updates to the IDE to fix bugs or add new features. Here is how you can update the IDE on your own.
NOTE: if you are using the Raspberry Pi/GoPiGo, use THESE INSTRUCTIONS instead.

STEP 1: Download the Latest Version
Version 0.5 for EV3:
https://drive.google.com/file/d/1HPz-wxQeGruLuBL9bY6JwFhh9k1_K-qw/view
STEP 2: Flash the SD Card
1. Download and install Etcher from their website.
2. Launch Etcher
3. Click the “Select image” button and browse to the folder where you downloaded an EZ3IDE release. Select the file that you downloaded.
4. Using an SD card reader, plug the SD card into your computer. Etcher should detect the new device and display its information under the “Select drive” step. Confirm that the selected drive is correct.
Note: If you have multiple removable drives connect, you may need to use the “Change” button to select the SD Card.
5. Click "Flash!" and wait for the operation to complete.
6. Plug it in the Brick and make sure it boots up.


Picture
200 Boston Ave, Medford, MA 02155
steamdiscoverylab@gmail.com
Center for Engineering Education and Outreach
​Tufts University
About
Tools
Projects
Resources
​
Contact
LEGO®, the LEGO® logo, the Brick, MINDSTORMS®, and the Minifigure are trademarks of ©The LEGO® Group. On some parts of this site  you will get access to so-called “developer software”, which offers documentation on different ways to operate the LEGO® Education SPIKE™ Prime Hub and technology. Whatever use you make of the developer software, bear in mind that the results are not experiences that the LEGO Group endorses, is with or will be liable for. No rights in or to trademarks of the LEGO Group are implied or given, and you may not apply to or register any protection anywhere in the world for intellectual property or industrial rights or similar in respect of any developer software, derivative or other result achieved through its use. The developer software is made available “as is” and, to the extent possible, no warranties or representations are implied or given in relation to it by the LEGO Group. It’s your responsibility to ensure all uses that you make and enable others to make comply with all applicable laws and best practices. By accessing the developer software, you acknowledge that the terms and conditions set out above and in LEGO Education’s terms of use for SPIKE Prime apply.
  • About
  • Tools
  • Projects
  • Resources