Skip to content

Commit 3bc7c5f

Browse files
authored
Added pause "p" option.
1 parent ba6a16d commit 3bc7c5f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

PythonBlueBox.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import pyaudio
44
import array
55
import math
6+
import time
67

78

89
user_freq = [697.0, 770.0, 852.0, 941.0,
@@ -57,12 +58,15 @@
5758
while True:
5859
commands = input('>>>')
5960
for command in commands:
60-
if command is 'U':
61+
if command.upper() is 'U':
6162
tone_set = user_tones
6263
continue
63-
elif command is 'O':
64+
elif command.upper() is 'O':
6465
tone_set = op_tones
6566
continue
67+
elif command.upper() is 'P':
68+
time.sleep(length)
69+
continue
6670
try:
6771
tone = tone_set[command]
6872
except KeyError:

0 commit comments

Comments
 (0)