Update kuukar_motion.py

This commit is contained in:
Siwat Sirichai 2022-12-12 16:18:59 +07:00
parent 8e31b4c159
commit 41b83b4d1b
1 changed files with 6 additions and 1 deletions

View File

@ -162,6 +162,11 @@ class motion:
time.sleep(0.3)
def __roam_handle(self):
time.sleep(1)
if self.sensors.sonar_get_distance()<500:
self.turn(50,0.5)
time.sleep(0.1)
self.drive(25)
time.sleep(0.5)
time.sleep(0.5)
if not self.roaming:
self.stop()