Teacher's Notes Pro Preview

At the end of this lesson, the students are going to have a small competition. For this purpose, they will need a race track.

To access the full video please subscribe to FLLCasts.com

Subscribe

  • #1561
  • 11 Mar 2020

Place two objects on the ground (it can be lego builds or other handy items) around which the students will program the robots to move around in the shape of a number 8. Mark the starting line at the beginning of a straight line.

content picture

Example solution to the tasks in the section "Learn to drive":

# Create your objects here. 
ev3 = EV3Brick()

steering_motor = Motor(Port.A)
driving_motor = Motor(Port.D)

# Write your program here.
steering_motor.run_angle(360, 30)
driving_motor.run_time(-360, 3000)
steering_motor.run_angle(360, -60)
driving_motor.run_time(-360, 3000)

Example solution to the task "Modify your program to perform the same sequence of actions, but using only the run_target command.":

# Create your objects here. 
ev3 = EV3Brick()

steering_motor = Motor(Port.A)
driving_motor = Motor(Port.D)

# Write your program here. 
steering_motor.run_target(360, 30)
driving_motor.run_target(-360, -360 * 3)
steering_motor.run_target(360, -30)
driving_motor.run_target(-360, -360 * 6)

Example solution to the task "Program the car to park perpendicular with moving only forward.":

# Create your objects here.
ev3 = EV3Brick()

steering_motor = Motor(Port.A)
driving_motor = Motor(Port.D)

# Write your program here. 
steering_motor.run_target(360, 30)
driving_motor.run_target(-360, -850)
steering_motor.run_target(3600)

Example solution to the task "Program the car to park perpendicular with moving only backward.":

# Create your objects here.
​​​​​​​ev3 = EV3Brick()

steering_motor = Motor(Port.A)
driving_motor = Motor(Port.D)

# Write your program here. 
steering_motor.run_target(360, 30)
driving_motor.run_target(-360, 850)
steering_motor.run_target(360, 0)

Example solution to the tasks in the secton "Practice before the big race":

Примерно решение на задачите в секция "Тренировка преди състезанието":

# Create your objects here.
​​​​​​​ev3 = EV3Brick()

steering_motor = Motor(Port.A)
driving_motor = Motor(Port.D)

# Write your program here. ​​​​​​​
driving_motor.run_time(-1000, 2000)
steering_motor.run_target(1000, 35)

driving_motor.run_time(-1000, 3500)
steering_motor.run_target(1000, 0)

driving_motor.run_time(-1000, 2000)
steering_motor.run_target(1000, -35)

driving_motor.run_time(-1000, 3500)
steering_motor.run_target(1000, 0)

Courses and lessons with this Tutorial

This Tutorial is used in the following courses and lessons

Image for Python with LEGO Mindstorms EV3 - Level 1
  • 74
  • 28:18
  • 114
Image for Lesson 6 - Steering an Unmanned Vehicle
  • 3
  • 7
  • 5
  • 3d_rotation 1