We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent efc31d7 commit a84e197Copy full SHA for a84e197
Make_It_Talk/say-temp.py
@@ -11,6 +11,11 @@
11
import audiocore
12
from digitalio import DigitalInOut, Direction, Pull
13
14
+# Enables the speaker for audio output
15
+spkrenable = DigitalInOut(board.SPEAKER_ENABLE)
16
+spkrenable.direction = Direction.OUTPUT
17
+spkrenable.value = True
18
+
19
D1 = board.BUTTON_A
20
D2 = board.BUTTON_B
21
@@ -43,7 +48,7 @@ def play_file(wavfile):
43
48
# Function should take an integer -299 to 299 and say it
44
49
# Assumes wav files are available for the numbers
45
50
def read_temp(temp):
46
- play_file("temperature.wav")
51
+ play_file("The temperature is.wav")
47
52
if temp < 0:
53
play_file("negative.wav")
54
temp = - temp
0 commit comments