Update kuukar_motion.py
This commit is contained in:
parent
82620a98ca
commit
387bbbb215
|
@ -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()
|
Loading…
Reference in New Issue