From 540ff628368897dafe3ebaef86d86170b8917d59 Mon Sep 17 00:00:00 2001 From: Atharv Nagavarapu <30nagava@elmbrookstudents.org> Date: Fri, 6 Feb 2026 14:38:41 +0000 Subject: [PATCH] Update diagnostics/MicroPythonDiagnostics.py --- diagnostics/MicroPythonDiagnostics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/diagnostics/MicroPythonDiagnostics.py b/diagnostics/MicroPythonDiagnostics.py index bda4138..27cd2f0 100644 --- a/diagnostics/MicroPythonDiagnostics.py +++ b/diagnostics/MicroPythonDiagnostics.py @@ -23,7 +23,7 @@ class MicroPythonDiagnostics: micropython.heap_lock() print("[Hub Diagnostics - MicroPython - Memory] Heap was locked. Attempting to allocate memory (this should fail):") try: - x = 5000 + y = 10000 print("[Hub Diagnostics - MicroPython - Memory] [FAIL] There was no MemoryError raised. Heap lock failed.") except MemoryError: print("[Hub Diagnostics - MicroPython - Memory] [SUCCESS] Allocation failed. Test successful. The heap was successfully locked.") @@ -32,7 +32,7 @@ class MicroPythonDiagnostics: micropython.heap_unlock() print("[Hub Diagnostics - MicroPython - Memory] Heap was unlocked. Attempting to allocate memory (this should succeed):") try: - y = 5001 + z = 17000 print("[Hub Diagnostics - MicroPython - Memory] [SUCCESS] There was no MemoryError raised. The value of the new variable y is", x) except MemoryError: print("[Hub Diagnostics - MicroPython - Memory] [FAIL] Allocation failed. The heap failed to unlock.")