diff options
| author | nasrlol <nsrddyn@gmail.com> | 2024-11-13 00:33:48 +0100 |
|---|---|---|
| committer | nasrlol <nsrddyn@gmail.com> | 2024-11-13 00:33:48 +0100 |
| commit | 16c71d8ddc79efff880346c39e918cf07c8abfdf (patch) | |
| tree | c5f8c596914f868a54a2cf32922c8f95f7ba573b | |
| parent | ecd194028a652cc29f300e4a6ca24675b5b8d9ba (diff) | |
clearning the dispplauy with every fuinction hoping it fixes the display
| -rw-r--r-- | bin/kasper_source.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/kasper_source.py b/bin/kasper_source.py index d878f6c..b7d8060 100644 --- a/bin/kasper_source.py +++ b/bin/kasper_source.py @@ -71,6 +71,8 @@ microphone = speech.Microphone() # Display Functions def display_cpu_info(): + # clearing the display before accessing it + lcd.clear() """Display CPU load and temperature on the LCD.""" while True: load = os.getloadavg()[0] # 1-minute load average @@ -82,6 +84,8 @@ def display_cpu_info(): def display_uptime(): + # clearing the display before accessing it + lcd.clear() """Display system uptime on the LCD.""" with open("/proc/uptime") as f: uptime_seconds = float(f.readline().split()[0]) @@ -91,6 +95,8 @@ def display_uptime(): def recognize_speech(): + # clearing the display before accessing it + lcd.clear() """Capture and transcribe speech input.""" try: with microphone as source: @@ -118,6 +124,8 @@ OPTIONS = { def main(): + # clearing the display before doing anything + lcd.clear() # Main program loop to accept user commands. print("WELCOME TO THE I2C COMMAND LINE CENTER") print("Options:", ", ".join(OPTIONS.keys())) |
