Learn EV3 Python

Before trying to master EV3 Python you should get plenty of practice working with standard Python (version 3) on your PC. As suggested on the 'Learn Python' page , I recommend you install PyCharm Edu on your PC and work through the introductory course that is included in that installation. The same page also suggests a number of sites where you can get a good, free online introduction to Python.

This 'Learn EV3 Python' section will teach you about the EV3-related functions that are present in EV3 Python but absent from standard Python, such as commands to interact with the robot's motors, sensors, LCD screen, buttons and loudspeaker.

I will assume that you are working with an EV3 robot vehicle with two powered wheels attached to motor ports B and C. The ev3dev.org site suggests the use of Laurens Valk's Explor3r robot, building instructions for which can be found HERE. Those instructions are for the Home version of the EV3 set but the model can also be made with the EV3 Education set with minor modifications.

EXPLOR3R with Touch Sensor and IR Sensor

The official Lego 'driving base' or 'educator vehicle' (shown below) is also suitable. This is the model that is used in the lessons that accompany the education version of the EV3. Building instructions for the education set are available HERE and for the home (retail) set HERE. The photos below include a sound sensor that is not part of the standard driving base, and the gyro is placed in an unconventional (better!) location. Notice that the wheel motors are attached to motor ports B and C:



Here below is the driving base / educator vehicle built from the home (retail) kit - note the smaller wheels, the absence of the gyro sensor and the double wheel at the back that replaces the castor wheel in the photo above.


Don't worry if you have the 'home' version of the EV3 set because the lessons on this site can nearly all be completed with either set, though you may need to make occasional modifications if you have the 'home' version of the EV3 set. For example, if you have the home version, you will need to substitute a different wheel assembly at the back of the model and you will need to substitute the infrared sensor for the ultrasonic sensor. Note that the very practical castor wheel of the education set is easily available for online purchase. If you have the home edition you will not be able to include the gyro sensor or the ultrasonic sensor in your models unless you buy them as optional extras.

HERE are some general tips about writing programs in EV3 Python.

Here are the lessons!