8.1.2 - Setup Code

Setup Code

All Edison programs must contain the Setup code that you see every time you open the EdPy App.

#-------------Setup---------------- import Ed Ed.EdisonVersion = Ed.V2 Ed.DistanceUnits = Ed.CM Ed.Tempo = Ed.TEMPO_MEDIUM #--------Your code below-----------

As you already learned lines starting with # are comments.

import Ed

The above code imports a library with commands that control edison robot.

Ed.DistanceUnits = Ed.CM

The above code sets the units to cm in driving commands


The above code sets the speed of playing music to normal speed.