From 387bbbb2154dd6bcf9650a00d5a82859b0be93ba Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Tue, 13 Dec 2022 21:45:14 +0700 Subject: [PATCH] Update kuukar_motion.py --- kuukar/kuukar_motion.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kuukar/kuukar_motion.py b/kuukar/kuukar_motion.py index 1094f12..8cd00f8 100644 --- a/kuukar/kuukar_motion.py +++ b/kuukar/kuukar_motion.py @@ -159,12 +159,12 @@ class motion: while True: if self.roaming: self.__roam_handle() - time.sleep(0.5) + time.sleep(0.1) def __roam_handle(self): - if self.sensors.sonar_get_distance()<500: - self.turn(30,2000) + if self.sensors.sonar_get_distance()<900: + self.turn(32,2600) self.drive(25) - time.sleep(0.5) + if not self.roaming: self.stop() \ No newline at end of file