From e8c25a4e906daf5dbbf6ae291cd6d2f7430f458a Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Thu, 4 Dec 2025 03:01:19 +0000 Subject: [PATCH] Update competition_codes/sectionals/sectional_main_experimental.py --- .../sectionals/sectional_main_experimental.py | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/competition_codes/sectionals/sectional_main_experimental.py b/competition_codes/sectionals/sectional_main_experimental.py index d6accad..715d7ba 100644 --- a/competition_codes/sectionals/sectional_main_experimental.py +++ b/competition_codes/sectionals/sectional_main_experimental.py @@ -21,7 +21,7 @@ drive_base = DriveBase(left_motor, right_motor, WHEEL_DIAMETER, AXLE_TRACK) drive_base.settings(600, 500, 300, 200) drive_base.use_gyro(True) -WALL_DISTANCE = 300 # mm +WALL_DISTANCE = 200 # mm async def drive_forward(): """Drive forward continuously using DriveBase.""" @@ -113,14 +113,15 @@ async def Run2_1(): await right_arm.run_angle(50,-30) await drive_base.arc(350,113, None) #) + await drive_base.straight(20) await drive_base.turn(-60) - await drive_base.straight(-40) + await drive_base.straight(-47) await right_arm.run_angle(500,-90) # arm down await wait(100) await drive_base.turn(20) # turn right a little bit #await wait(100) - await right_arm.run_angle(500,90) #arm up + await right_arm.run_angle(500,140) #arm up await drive_base.turn(-20) #reset position await drive_base.straight(50) @@ -175,14 +176,14 @@ async def Run_3_4(): #combined angler artifacts and tip the scale - experimental await drive_base.turn(90) await drive_base.arc(-150,-100, None) - await drive_base.straight(100) + await drive_base.straight(135) await right_arm.run_angle(800,-150) await right_arm.run_angle(900,150) - await drive_base.straight(-80) - await drive_base.turn(-67) - await drive_base.straight(450,Stop.COAST_SMART) - await drive_base.arc(10,-25, None) + await drive_base.straight(-100) + await drive_base.turn(-65) + await drive_base.straight(320,Stop.COAST_SMART) + await drive_base.arc(10,-47, None) #await drive_base.turn(-23, Stop.COAST_SMART) await multitask( @@ -324,7 +325,7 @@ async def main(): if color == "Red": print('Running Mission 3') - await Run3() #red + await Run2_1() #red elif color == "Orange": print('Running Mission 6') await Run6_1() #orange @@ -342,9 +343,9 @@ async def main(): await Run6_7() #purple - vertically elif color == "Light_Blue": print("Running Mission 2_1") - await Run2_1() + await Run3() else: print(f"Unknown color detected (Hue: {h}, Sat: {s}, Val: {v})") await wait(10) # Run the main function -run_task(main()) \ No newline at end of file +run_task(main())