Book
Week 4 - Section 1 - Ed Py
Week 4 - Section 1 - Ed Py
Completion requirements
View
Chapter 11.5 - Unlimited
So what if you want to drive your robot without stopping or stop it after an event or after some time. The you have to use the parameter Ed.DISTANCE_UNLIMITED
Copy the following code to edison
#-------------Setup----------------
import Ed
Ed.EdisonVersion = Ed.V2
Ed.DistanceUnits = Ed.CM
Ed.Tempo = Ed.TEMPO_MEDIUM
#--------Your code below-----------
Ed.Drive(Ed.FORWARD, Ed.SPEED_6, Ed.DISTANCE_UNLIMITED)
Ed.TimeWait(500, Ed.TIME_MILLISECONDS)
Ed.Drive(Ed.STOP, Ed.SPEED_10, 0)
With these set of commands edison drives forward with speed 6 for 500 milliseconds or half a second.