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 Microsoft Visual Studio Code with the EV3 extension on your PC. 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. I recommend you use the official Lego 'driving base' or 'educator vehicle' (shown below). This is the model that is used in the lessons that accompany the education version of the EV3 software. 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!