Update kuukar_motion.py

This commit is contained in:
Siwat Sirichai 2022-12-13 21:45:14 +07:00
parent 82620a98ca
commit 387bbbb215
1 changed files with 4 additions and 4 deletions

View File

@ -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()