summaryrefslogtreecommitdiff
path: root/script.py
diff options
context:
space:
mode:
authorAbdellah El Morabit <nsrddyn@gmail.com>2024-11-05 11:36:22 +0100
committerAbdellah El Morabit <nsrddyn@gmail.com>2024-11-05 11:36:22 +0100
commitd7b8b6ae21c07fe52e691e9090c24de0d09a401f (patch)
tree88a2fe1056db3ce2cb5af35974e906b184be55f7 /script.py
parent5466f96bd75f602f5b5fd44a7ccee745f2abfca0 (diff)
making a script file for make the lcd rpi dipslay more interactive
Diffstat (limited to 'script.py')
-rw-r--r--script.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/script.py b/script.py
new file mode 100644
index 0000000..6f79a59
--- /dev/null
+++ b/script.py
@@ -0,0 +1,27 @@
+import random
+import time
+from rpi_LCD import LCD
+import speech_recognition as sr
+import sounddevice
+import os
+
+LCD = LCD()
+VOICE_REC = sr.Recognizer()
+MIC = sr.Microphone()
+PROCES_LOAD = os.getloadavg()
+TIME = current_time.time()
+
+# ERROR CODES
+ERROR_BAD_REQUEST = '400'
+ERROR_UNAUTHORIZED = '401'
+ERROR_NOT_FOUND = '404'
+ERROR_TIMEOUT = '408'
+
+def CPU_INFO():
+ while (True):
+ LCD.tex(PROCES_LOAD(),1)
+
+def CLOCK():
+ LCD.text(TIME,1)
+
+