Compare commits
No commits in common. "da809ad79d8a5bd7df3b642d72474537c17bfbf5" and "41b83b4d1b1e3ef299265720bf55a6c5227985b0" have entirely different histories.
da809ad79d
...
41b83b4d1b
|
@ -159,13 +159,14 @@ class motion:
|
||||||
while True:
|
while True:
|
||||||
if self.roaming:
|
if self.roaming:
|
||||||
self.__roam_handle()
|
self.__roam_handle()
|
||||||
time.sleep(0.5)
|
time.sleep(0.3)
|
||||||
|
|
||||||
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,1.5)
|
self.turn(50,0.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()
|
Loading…
Reference in New Issue