Compare commits

...

2 Commits

Author SHA1 Message Date
Siwat Sirichai da809ad79d Update kuukar_motion.py 2022-12-12 16:35:45 +07:00
Siwat Sirichai 42463e14d6 Update kuukar_motion.py 2022-12-12 16:35:34 +07:00
1 changed files with 2 additions and 3 deletions

View File

@ -159,14 +159,13 @@ class motion:
while True: while True:
if self.roaming: if self.roaming:
self.__roam_handle() self.__roam_handle()
time.sleep(0.3) time.sleep(0.5)
def __roam_handle(self): def __roam_handle(self):
if self.sensors.sonar_get_distance()<500: if self.sensors.sonar_get_distance()<500:
self.turn(50,0.5) self.turn(50,1.5)
time.sleep(0.1) time.sleep(0.1)
self.drive(25) self.drive(25)
time.sleep(0.5) time.sleep(0.5)
time.sleep(0.5)
if not self.roaming: if not self.roaming:
self.stop() self.stop()