import drive
import light
import time


while True:
  drive.drive_rpm(50, 50)
  if light.get_optical_sensor(3) < 40:
    drive.drive_rpm(-100, -100)
    time.sleep_ms(int(1000))
    drive.stop_rpm(0)
    time.sleep_ms(int(1000))
    drive.drive_rpm(50, 0)
    time.sleep_ms(int(500))
    drive.stop_rpm(0)
