Skip to content

Commit

Permalink
missing import
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas committed Jan 19, 2017
1 parent 126a45e commit 80f7b50
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
12 changes: 9 additions & 3 deletions autonomous.py
Expand Up @@ -35,11 +35,17 @@ def autodrive(dur):
wheels.stop()
if (ldist < rdist):
mode=RIGHT
wheels.right(-100)
wheels.backward(-100)
time.sleep(1)
wheels.right(-250)
time.sleep(1)
else:
mode=LEFT
wheels.left(-100)

wheels.backward(-100)
time.sleep(1)
wheels.left(-250)
time.sleep(1)

if (mode==LEFT or mode==RIGHT):
if (cdist > 50):
mode=FORWARD
Expand Down
5 changes: 3 additions & 2 deletions speaker.py
@@ -1,8 +1,9 @@
import subprocess
import os

def say(text):
if 'VOICE' in os.environ:
voice = os.environ['VOICE']
if 'VOICE' in os.environ:
voice = os.environ['VOICE']
subprocess.Popen(['flite', '-voice', voice,'-t', text])
else:
subprocess.Popen(['flite', '-t', text])
Expand Down

0 comments on commit 80f7b50

Please sign in to comment.