summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/source/main.py29
1 files changed, 16 insertions, 13 deletions
diff --git a/bin/source/main.py b/bin/source/main.py
index bf556ca..c29b19f 100644
--- a/bin/source/main.py
+++ b/bin/source/main.py
@@ -21,7 +21,7 @@ microphone = speech.Microphone()
21# shows a hello line; shorter than 16 chars 21# shows a hello line; shorter than 16 chars
22# and some small information on the second line 22# and some small information on the second line
23def custom_greeting(): 23def custom_greeting():
24 with open('quotes.txt', 'r') as file: 24 with open("quotes.txt", "r") as file:
25 quotes = file.readlines() 25 quotes = file.readlines()
26 26
27 # Strip newline characters and use the quotes 27 # Strip newline characters and use the quotes
@@ -37,10 +37,12 @@ def custom_greeting():
37 if count < 16: 37 if count < 16:
38 first_line += i 38 first_line += i
39 count += 1 39 count += 1
40 else: 40 else:
41 second_line += i 41 second_line += i
42 lcd.text(first_line,1) 42 lcd.text(first_line, 1)
43 lcd.text(secon_line,2) 43 lcd.text(second_line, 2)
44
45
44def pomodoro(): 46def pomodoro():
45 time = input("How long do you want to wait? : ") 47 time = input("How long do you want to wait? : ")
46 print("Okay \nStarting Now...") 48 print("Okay \nStarting Now...")
@@ -50,7 +52,7 @@ def pomodoro():
50 lcd.text(time + " Seconds remaining...", 1) 52 lcd.text(time + " Seconds remaining...", 1)
51 time -= 1 53 time -= 1
52 54
53 55
54def weather(): 56def weather():
55 pass 57 pass
56 58
@@ -127,8 +129,9 @@ def save_notes():
127 count += 1 129 count += 1
128 else: 130 else:
129 second_line += output_list[i] 131 second_line += output_list[i]
130 lcd.text(first_line,1) 132 lcd.text(first_line, 1)
131 lcd.text(secon_line,2) 133 lcd.text(secon_line, 2)
134
132 135
133def command_center(commands): 136def command_center(commands):
134 # checking if we can reconize commands within the user speech 137 # checking if we can reconize commands within the user speech
@@ -147,12 +150,12 @@ def command_center(commands):
147 150
148 151
149FEATURES = { 152FEATURES = {
150 "READINGS": system_readings, 153 "READINGS": system_readings,
151 "UPTIME": display_uptime, 154 "UPTIME": display_uptime,
152 "SPEECH_TRANSCRIBER": recognize_speech, 155 "SPEECH_TRANSCRIBER": recognize_speech,
153 "NOTES": save_notes, 156 "NOTES": save_notes,
154 "COMMAND CENTER": command_center, 157 "COMMAND CENTER": command_center,
155 } 158}
156 159
157 160
158def main(): 161def main():