# Teacher Notes: Traversing a known tunnel using Python ProPreview

• #1624
• 02 Jul 2020

### Cardboard Boxes

It's possible for you to have cardboard boxes - something from the school, shoe boxes, candy boxes, etc.

The only important criteria is for the boxes to be higher than 20cm so that they are higher than the robots.

### Example solutions

Example solutions to the task "Program the robot to move until the touch sensor is pressed.":

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

touch = TouchSensor(Port.S1)

left_motor = Motor(Port.B)
right_motor = Motor(Port.C)

ev3.speaker.beep()

while not touch.pressed():
left_motor.run(500)
right_motor.run(500)

left_motor.brake()
right_motor.brake()```

Example solution to the task "Program the robot, after the touch sensor has been pressed, to turn by moving only one motor backwards.":

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

touch = TouchSensor(Port.S1)

left_motor = Motor(Port.B)
right_motor = Motor(Port.C)

ev3.speaker.beep()

while not touch.pressed():
left_motor.run(500)
right_motor.run(500)

left_motor.brake()
right_motor.run_time(-700, 1000)```
```# Create your objects here.
ev3 = EV3Brick()

touch = TouchSensor(Port.S1)

left_motor = Motor(Port.B)
right_motor = Motor(Port.C)

ev3.speaker.beep()

# Move forward till you reach the first wall

while not touch.pressed():
left_motor.run(500)
right_motor.run(500)

# Turn right

left_motor.brake()
right_motor.run_time(-700, 1000)

# Move forward till you reach the second wall

while not touch.pressed():
left_motor.run(500)
right_motor.run(500)

# Turn left

right_motor.brake()
left_motor.run_time(-700, 1000)

# Move forward till you reach the third wall

while not touch.pressed():
left_motor.run(500)
right_motor.run(500)

# Turn right

left_motor.brake()
right_motor.run_time(-700, 1000)

# Move forward till you reach the last wall

while not touch.pressed():
left_motor.run(500)
right_motor.run(500) ```

## Courses and lessons with this Tutorial

This Tutorial is used in the following courses and lessons

• 39
• 19:58
• 93
• 10
• 3
• 8
• 3d_rotation 1