From 05be290f90ef00ebff4f87654fdbe1bd664efba6 Mon Sep 17 00:00:00 2001 From: Atharv <30nagava@elmbrookstudents.org> Date: Tue, 25 Nov 2025 20:23:48 +0000 Subject: [PATCH] Update competition_codes/sectionals/sectional_main_experimental.py --- .../sectionals/sectional_main_experimental.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/competition_codes/sectionals/sectional_main_experimental.py b/competition_codes/sectionals/sectional_main_experimental.py index dabb297..164ddc0 100644 --- a/competition_codes/sectionals/sectional_main_experimental.py +++ b/competition_codes/sectionals/sectional_main_experimental.py @@ -31,9 +31,6 @@ async def drive_backward(): """Drive forward continuously using DriveBase.""" drive_base.drive(400, 0) -async def async_drive(speed, direction): - drive_base.d - async def monitor_distance(): """Monitor ultrasonic sensor and stop when wall is detected.""" @@ -46,11 +43,14 @@ async def monitor_distance(): drive_base.stop() print(f"Wall detected at {distance}mm!") break + if distance is None: + continue + # Small delay to prevent overwhelming the sensor await wait(50) -# Experimental - Removed forge and who live here part +# Experimental - Removed forge and who lived here part async def Run1(): # From M8_5.py right_arm.run_angle(500,30) left_arm.run_angle(500,90)