Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from PiBot import PiBot
- # Create a robot instance
- robot = PiBot()
- # Get distance from object using the front middle IR sensor
- robot.sleep(1)
- robot.movement = robot.get_left_line_sensors() and robot.get_right_line_sensors() and robot.get_line_sensors()
- while robot.movement < 300:
- robot.set_wheels_speed(30)
- if robot.movement > 300:
- robot.get_rotation = True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement