From 33ce221a6b82564b125833e7134652f81c91a942 Mon Sep 17 00:00:00 2001 From: Atharv Nagavarapu <30nagava@elmbrookstudents.org> Date: Fri, 5 Dec 2025 20:20:12 +0000 Subject: [PATCH 1/3] Update utils/BatteryAndHubDiagnostics.py --- utils/{Diagnostics.py => BatteryAndHubDiagnostics.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename utils/{Diagnostics.py => BatteryAndHubDiagnostics.py} (100%) diff --git a/utils/Diagnostics.py b/utils/BatteryAndHubDiagnostics.py similarity index 100% rename from utils/Diagnostics.py rename to utils/BatteryAndHubDiagnostics.py From ce8212968b11c65e4436e1db0036750b225fe467 Mon Sep 17 00:00:00 2001 From: Atharv Nagavarapu <30nagava@elmbrookstudents.org> Date: Fri, 5 Dec 2025 21:40:51 +0000 Subject: [PATCH 2/3] Add utils/FullDiagnostics.py --- utils/FullDiagnostics.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 utils/FullDiagnostics.py diff --git a/utils/FullDiagnostics.py b/utils/FullDiagnostics.py new file mode 100644 index 0000000..af8a6b0 --- /dev/null +++ b/utils/FullDiagnostics.py @@ -0,0 +1,35 @@ +from pybricks.hubs import PrimeHub +from pybricks.pupdevices import Motor, ColorSensor, UltrasonicSensor, ForceSensor +from pybricks.parameters import Button, Color, Direction, Port, Side, Stop +from pybricks.robotics import DriveBase +from pybricks.tools import wait, StopWatch +hub = PrimeHub() +from BatteryDiagnostics import BatteryDiagnostics +battery = BatteryDiagnostics() +clearConfirmation = input("Do you want to clear the console before proceeding? Y/N (default: yes): ") +if(clearConfirmation == "Y" or clearConfirmation == "y" or clearConfirmation == "yes" or clearConfirmation == ""): + print("Clearing console... \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n") + +while True: + print("\nWhat diagnostic do you want to perform?") + print("Enter 'b' for Battery diagnostics") + print("Enter 'm' for Motor diagnostics") + print("Enter 'q' to Quit") + + choice = input("Your choice: ").strip().lower() + + if choice == "b": + print("-----------------------BATTERY DIAGNOSTICS-----------------------") + battery.printAll() + + elif choice == "m": + print("------------------------MOTOR DIAGNOSTICS------------------------") + # motor.printAll() # call your motor diagnostics here + print("Motor diagnostics would run here.") + + elif choice == "q": + print("Diagnostics completed successfully. Exiting with code 0. Good luck in the robot game!") + break + + else: + print("Invalid choice. Please enter 'b', 'm', or 'q'.") \ No newline at end of file From 9473dfdeaa7f73531c1d919e2023df81219f5e71 Mon Sep 17 00:00:00 2001 From: Atharv Nagavarapu <30nagava@elmbrookstudents.org> Date: Fri, 5 Dec 2025 21:41:02 +0000 Subject: [PATCH 3/3] Update utils/BatteryDiagnostics.py --- utils/{BatteryAndHubDiagnostics.py => BatteryDiagnostics.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename utils/{BatteryAndHubDiagnostics.py => BatteryDiagnostics.py} (100%) diff --git a/utils/BatteryAndHubDiagnostics.py b/utils/BatteryDiagnostics.py similarity index 100% rename from utils/BatteryAndHubDiagnostics.py rename to utils/BatteryDiagnostics.py