Learn 3: Create Your First Class
This is the fifth challenge within the Robotics with GoPiGo and Python Curriculum.
Your task is to design a robot program to deliver a selection of mail to the residents of GoPiGo Drive, a small cul-de-sac containing 3 houses.
Learn how to how to use and calibrate the color sensor.
4. Reset Method
To allow us to reset the courier’s state on demand, let’s also create a reset() function that performs the following functions
- close its eyes
- set the motor speed
- clear the emergency stop flag
- take an initial position reading from the line follower
def reset(self):
courier.close_eyes()
courier.set_speed(courier.DEFAULT_SPEED)
self.emergency_stop_flag = 0
self.position = line_follower.position_val()
Be certain that the indentation matches that of the init() method!!!