From 9cff4d86264df49754052d2421d904407732a198 Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Fri, 19 Sep 2025 22:00:28 +0000 Subject: [PATCH 01/70] Update missions/Send_Over.py --- missions/Send_Over.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/missions/Send_Over.py b/missions/Send_Over.py index a769f1d..c95d702 100644 --- a/missions/Send_Over.py +++ b/missions/Send_Over.py @@ -13,22 +13,19 @@ right_motor = Motor(Port.B) left_arm = Motor(Port.C, Direction.COUNTERCLOCKWISE) right_arm = Motor(Port.D) -drive_base = DriveBase(left_motor, right_motor, wheel_diameter=64.8, axle_track=180) +drive_base = DriveBase(left_motor, right_motor, wheel_diameter=68.8, axle_track=180) drive_base.settings(600,500,300,200) drive_base.use_gyro(True) async def main(): - await drive_base.straight(855) + await drive_base.straight(915) await drive_base.turn(-90) - await drive_base.straight(50) - await left_arm.run_angle(10000,-15000) - await drive_base.straight(-50) - await drive_base.turn(90) + await drive_base.straight(60) + await left_arm.run_angle(10000,-4000) + await drive_base.straight(-60) + await drive_base.turn(85) await drive_base.straight(2000) - - - - + run_task(main()) \ No newline at end of file -- 2.49.1 From a20bf2255b01c0dcafe2fb1b0126bad014d8962c Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Sat, 20 Sep 2025 22:52:04 +0000 Subject: [PATCH 02/70] Update missions/Send_Over.py --- missions/Send_Over.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/missions/Send_Over.py b/missions/Send_Over.py index c95d702..61e2d37 100644 --- a/missions/Send_Over.py +++ b/missions/Send_Over.py @@ -24,8 +24,8 @@ async def main(): await drive_base.turn(-90) await drive_base.straight(60) await left_arm.run_angle(10000,-4000) - await drive_base.straight(-60) - await drive_base.turn(85) + await drive_base.straight(-90) + await drive_base.turn(80) await drive_base.straight(2000) run_task(main()) \ No newline at end of file -- 2.49.1 From 3527ee56004918e5c57e55377ac9f03bbe1ad61f Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Fri, 26 Sep 2025 21:45:42 +0000 Subject: [PATCH 03/70] Add missions/Lift Parthicc made this originally. --- missions/Lift | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 missions/Lift diff --git a/missions/Lift b/missions/Lift new file mode 100644 index 0000000..a5e1773 --- /dev/null +++ b/missions/Lift @@ -0,0 +1,34 @@ +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 +from pybricks.tools import run_task, multitask + +hub = PrimeHub() + +left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) +right_motor = Motor(Port.B) + +left_arm = Motor(Port.C, Direction.COUNTERCLOCKWISE) +right_arm = Motor(Port.D) +drive_base = DriveBase(left_motor, right_motor, wheel_diameter=68.8, axle_track=180) +drive_base.settings(600,500,300,200) +drive_base.use_gyro(True) + +async def main(): + await drive_base.straight(200) + await drive_base.turn(-20) + await drive_base.straight(525) + await drive_base.turn(60) + + await drive_base.straight(50) + await right_arm.run_angle(2000,1000) + await drive_base.straight(-50) + await drive_base.turn(45) + await drive_base.straight(50) + await right_arm.run_angle(350,-1000) + + await drive_base.turn(-100) + await drive_base.straight(-600) +run_task(main()) \ No newline at end of file -- 2.49.1 From b8620e37aa38bf6bed3a1868862d69fcca235d1b Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Fri, 26 Sep 2025 21:46:12 +0000 Subject: [PATCH 04/70] Update missions/Lift.py --- missions/{Lift => Lift.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename missions/{Lift => Lift.py} (100%) diff --git a/missions/Lift b/missions/Lift.py similarity index 100% rename from missions/Lift rename to missions/Lift.py -- 2.49.1 From 47c89cba0acd61364986eedae6af76876a5bb70f Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Fri, 3 Oct 2025 21:26:35 +0000 Subject: [PATCH 05/70] Add missions/Lift2.py --- missions/Lift2.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 missions/Lift2.py diff --git a/missions/Lift2.py b/missions/Lift2.py new file mode 100644 index 0000000..a5e1773 --- /dev/null +++ b/missions/Lift2.py @@ -0,0 +1,34 @@ +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 +from pybricks.tools import run_task, multitask + +hub = PrimeHub() + +left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) +right_motor = Motor(Port.B) + +left_arm = Motor(Port.C, Direction.COUNTERCLOCKWISE) +right_arm = Motor(Port.D) +drive_base = DriveBase(left_motor, right_motor, wheel_diameter=68.8, axle_track=180) +drive_base.settings(600,500,300,200) +drive_base.use_gyro(True) + +async def main(): + await drive_base.straight(200) + await drive_base.turn(-20) + await drive_base.straight(525) + await drive_base.turn(60) + + await drive_base.straight(50) + await right_arm.run_angle(2000,1000) + await drive_base.straight(-50) + await drive_base.turn(45) + await drive_base.straight(50) + await right_arm.run_angle(350,-1000) + + await drive_base.turn(-100) + await drive_base.straight(-600) +run_task(main()) \ No newline at end of file -- 2.49.1 From 95c3491b44485526926f29a13ee447111a1ebd2d Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Sat, 4 Oct 2025 00:53:13 +0000 Subject: [PATCH 06/70] Update missions/M8_5.py --- missions/M8_5.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/missions/M8_5.py b/missions/M8_5.py index 69e364d..cf05500 100644 --- a/missions/M8_5.py +++ b/missions/M8_5.py @@ -30,12 +30,12 @@ async def main(): await right_arm.run_angle(5000,-500, Stop.HOLD) await drive_base.turn(-20) - await drive_base.straight(275) + await drive_base.straight(277) await drive_base.turn(20) - await drive_base.straight(63) + await drive_base.straight(65) await drive_base.turn(-30) - right_arm.run_angle(50,500) + right_arm.run_angle(70,500) await drive_base.turn(45) await drive_base.straight(-135) await drive_base.turn(-60) @@ -45,5 +45,5 @@ async def main(): await left_arm.run_angle(1000,450) await drive_base.straight(10) await drive_base.turn(35) - await drive_base.straight(-500) + await drive_base.straight(-600) run_task(main()) \ No newline at end of file -- 2.49.1 From f7072a6207d0eaeb796260383ac4e2fbb79e6237 Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Fri, 10 Oct 2025 20:56:17 +0000 Subject: [PATCH 07/70] Update final/main4.py --- final/main4.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/final/main4.py b/final/main4.py index 7dc67cc..098e8a4 100644 --- a/final/main4.py +++ b/final/main4.py @@ -25,13 +25,13 @@ async def Run1(): await right_arm.run_angle(5000,500, Stop.HOLD) await right_arm.run_angle(5000,-500, Stop.HOLD) await drive_base.turn(-20) - await drive_base.straight(275) + await drive_base.straight(277) await drive_base.turn(20) - await drive_base.straight(63) + await drive_base.straight(65) await drive_base.turn(-30) right_arm.run_angle(50,500) await drive_base.turn(45) - await drive_base.straight(-135) + await drive_base.straight(-145) await drive_base.turn(-60) await drive_base.straight(90) await left_arm.run_angle(1000,-450) @@ -39,7 +39,7 @@ async def Run1(): await left_arm.run_angle(1000,450) await drive_base.straight(10) await drive_base.turn(35) - await drive_base.straight(-500) + await drive_base.straight(-600) async def Run2(): await drive_base.straight(200) await drive_base.turn(-20) @@ -51,15 +51,16 @@ async def Run2(): await drive_base.turn(45) await drive_base.straight(50) await right_arm.run_angle(350,-1000) + await drive_base.straight(-100) await drive_base.turn(-100) await drive_base.straight(-600) async def Run3(): - await drive_base.straight(915) - await drive_base.turn(-90) - await drive_base.straight(60) - await left_arm.run_angle(10000,-15000) - await drive_base.straight(-60) - await drive_base.turn(85) + await drive_base.straight(920) + await drive_base.turn(-90,Stop.HOLD) + await drive_base.straight(65) + await left_arm.run_angle(10000,-3000) + await drive_base.straight(-100) + await drive_base.turn(90) await drive_base.straight(2000) async def Run5(): await drive_base.straight(420) -- 2.49.1 From 42090eae56f9166b7a3eb102678eede9c2a617f3 Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Fri, 10 Oct 2025 21:02:03 +0000 Subject: [PATCH 08/70] Update final/main4.py --- final/main4.py | 1 + 1 file changed, 1 insertion(+) diff --git a/final/main4.py b/final/main4.py index 098e8a4..d45f9d3 100644 --- a/final/main4.py +++ b/final/main4.py @@ -58,6 +58,7 @@ async def Run3(): await drive_base.straight(920) await drive_base.turn(-90,Stop.HOLD) await drive_base.straight(65) + drive_base.turn(-10) await left_arm.run_angle(10000,-3000) await drive_base.straight(-100) await drive_base.turn(90) -- 2.49.1 From 2d9eb496a3a78df4e8ab50259fb385fcd8f5896c Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Fri, 10 Oct 2025 21:03:57 +0000 Subject: [PATCH 09/70] Update final/main4.py --- final/main4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/final/main4.py b/final/main4.py index d45f9d3..3d112d8 100644 --- a/final/main4.py +++ b/final/main4.py @@ -59,7 +59,7 @@ async def Run3(): await drive_base.turn(-90,Stop.HOLD) await drive_base.straight(65) drive_base.turn(-10) - await left_arm.run_angle(10000,-3000) + await left_arm.run_angle(10000,-4000) await drive_base.straight(-100) await drive_base.turn(90) await drive_base.straight(2000) -- 2.49.1 From a3b04d3e00872e756f2edfbdb50b562181cc58d3 Mon Sep 17 00:00:00 2001 From: Rishikesh Lolapu <31lolapr@elmbrookstudents.org> Date: Fri, 10 Oct 2025 21:25:32 +0000 Subject: [PATCH 10/70] Add final/main5.py --- final/main5.py | 278 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 278 insertions(+) create mode 100644 final/main5.py diff --git a/final/main5.py b/final/main5.py new file mode 100644 index 0000000..73e506e --- /dev/null +++ b/final/main5.py @@ -0,0 +1,278 @@ +from pybricks.hubs import PrimeHub +from pybricks.pupdevices import Motor, ColorSensor +from pybricks.parameters import Port, Stop, Color, Direction +from pybricks.robotics import DriveBase +from pybricks.tools import wait, StopWatch, multitask, run_task + +hub = PrimeHub() +left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) +right_motor = Motor(Port.B) +left_arm = Motor(Port.C)#, Direction.COUNTERCLOCKWISE) +right_arm = Motor(Port.D) +drive_base = DriveBase(left_motor, right_motor, wheel_diameter=68.8, axle_track=180) +drive_base.settings(550,700,100,100) +drive_base.use_gyro(True) +color_sensor = ColorSensor(Port.F) +Color.ORANGE = Color(37, 85, 95) +Color.BLUE = Color(230,100,100) +color_sensor.detectable_colors([Color.ORANGE, Color.BLUE, Color.GREEN, Color.WHITE, Color.RED, Color.YELLOW]) +hub.speaker.volume(50) # Set the volume of the speaker +color_sensor.detectable_colors() +# Celebration sound types +class CelebrationSound: + VICTORY_FANFARE = 0 + LEVEL_UP = 1 + SUCCESS_CHIME = 2 + TA_DA = 3 + POWER_UP = 4 + RICKROLL_INSPIRED = 5 + +async def play_victory_fanfare(): + """Classic victory fanfare""" + notes = [ + (262, 200), # C4 + (262, 200), # C4 + (262, 200), # C4 + (349, 600), # F4 + ] + + for freq, duration in notes: + await hub.speaker.beep(freq, duration) + await wait(50) +async def play_level_up(): + """Upward scale for level completion""" + notesold = [ + (262, 100), # C4 + (294, 100), # D4 + (330, 100), # E4 + (349, 100), # F4 + (392, 100), # G4 + (440, 100), # A4 + (494, 100), # B4 + (523, 300), # C5 + ] + notes = [ + (277, 100), + (330, 100), + (277, 100), + (554, 100), + (277, 100), + (413, 100), + (330, 100), + (277, 100), + (413, 100), + (277, 100), + (554, 100), + (413, 100), + (277, 100), + (413, 100), + (554, 100), + (413, 100) + ] + + for freq, duration in notes: + await hub.speaker.beep(freq, duration) + #await wait(20) +async def play_success_chime(): + """Simple success notification""" + notes = [ + (523, 150), # C5 + (659, 150), # E5 + (784, 300), # G5 + ] + + for freq, duration in notes: + await hub.speaker.beep(freq, duration) + await wait(50) +async def play_ta_da(): + """Classic "ta-da!" sound""" + notes = [ + (392, 200), # G4 + (523, 400), # C5 + ] + + for freq, duration in notes: + await hub.speaker.beep(freq, duration) + await wait(100) +async def play_power_up(): + """Rising power-up sound""" + for freq in range(200, 800, 50): + await hub.speaker.beep(freq, 50) + await wait(10) + await hub.speaker.beep(1000, 200) +async def play_rickroll_inspired(): + """Fun 80s-style dance beat inspired sound""" + # Upbeat bouncy rhythm + pattern = [ + (392, 200), (440, 200), (494, 200), (523, 200), + (440, 200), (392, 200), (349, 200), (392, 300), + (440, 200), (392, 200), (349, 200), (330, 400), + ] + + for freq, duration in pattern: + await hub.speaker.beep(freq, duration) + await wait(50) +async def celebrate_mission_complete(sound_type=CelebrationSound.SUCCESS_CHIME): + """ + Main celebration function to call after completing a mission. + Plays a sound and shows light animation. + + Args: + sound_type: CelebrationSound enum value (default: SUCCESS_CHIME) + """ + # Light show + hub.light.on(Color.GREEN) + + # Play the selected celebration sound + if sound_type == CelebrationSound.VICTORY_FANFARE: + await play_victory_fanfare() + elif sound_type == CelebrationSound.LEVEL_UP: + await play_level_up() + elif sound_type == CelebrationSound.SUCCESS_CHIME: + await play_success_chime() + elif sound_type == CelebrationSound.TA_DA: + await play_ta_da() + elif sound_type == CelebrationSound.POWER_UP: + await play_power_up() + elif sound_type == CelebrationSound.RICKROLL_INSPIRED: + await play_rickroll_inspired() + else: + await play_success_chime() # Default fallback + + # Blink the light + for _ in range(3): + hub.light.off() + await wait(100) + hub.light.on(Color.GREEN) + await wait(100) + + hub.light.off() + +async def Run1(): + await multitask(left_arm.run_angle(1000, 300), right_arm.run_angle(1000,500)) + await drive_base.straight(320) + + await right_arm.run_angle(5000,-500, Stop.HOLD) + await right_arm.run_angle(5000,500, Stop.HOLD) + await right_arm.run_angle(5000,-500, Stop.HOLD) + await right_arm.run_angle(5000,500, Stop.HOLD) + await right_arm.run_angle(5000,-500, Stop.HOLD) + + await drive_base.turn(-20) + await drive_base.straight(275) + await drive_base.turn(20) + await drive_base.straight(63) + + await multitask(drive_base.turn(-30), right_arm.run_angle(50,500)) + await drive_base.turn(45) + await drive_base.straight(-135) + await drive_base.turn(-60) + await drive_base.straight(90) + await left_arm.run_angle(1000,-450) + await drive_base.straight(-145) + await left_arm.run_angle(1000,450) + await drive_base.straight(10) + await drive_base.turn(35) + await drive_base.straight(-500) + +async def Run2(): + await drive_base.straight(200) + await drive_base.turn(-20) + await drive_base.straight(525) + await drive_base.turn(60) + + await drive_base.straight(50) + await right_arm.run_angle(2000,1000) + await drive_base.straight(-50) + await drive_base.turn(45) + await drive_base.straight(50) + await right_arm.run_angle(350,-1000) + + await drive_base.turn(-100) + await drive_base.straight(-600) + + +async def Run3(): + await drive_base.straight(915) + await drive_base.turn(-90) + await drive_base.straight(60) + await left_arm.run_angle(10000,-15000) + await drive_base.straight(-60) + await drive_base.turn(85) + await drive_base.straight(2000) + +async def Run4(): + await drive_base.straight(519) + await left_arm.run_angle(300, -100) + await left_arm.run_angle(300, 500) + await drive_base.straight(180) + await drive_base.turn(-37) + await drive_base.straight(50) + await right_arm.run_angle(300, -400) + await drive_base.straight(-150) + await drive_base.turn(125) + await drive_base.straight(50) + await right_arm.run_angle(300, 400) + await drive_base.straight(-75) + await right_arm.run_angle(300, 300) + await drive_base.turn(-40) + await drive_base.straight(250) + await right_arm.run_angle(100, -300) + await drive_base.straight(30) + await right_arm.run_angle(50,-300) + await drive_base.turn(30) + await drive_base.straight(-200) + await drive_base.turn(-50) + await drive_base.straight(-800) + +async def Run5(): + await drive_base.straight(420) + await right_arm.run_angle(300,-100) + await drive_base.straight(-100) + await right_arm.run_angle(300, 100) + await drive_base.straight(-350) + + +async def Run6(): + await drive_base.straight(420) + await right_arm.run_angle(300,-100) + await drive_base.straight(-100) + await right_arm.run_angle(300, 100) + await drive_base.straight(-350) +async def main(): + while True: + + await celebrate_mission_complete(CelebrationSound.LEVEL_UP) + color_reflected_percent = await color_sensor.reflection() + print(color_reflected_percent) + + color_detected = await color_sensor.color() + print(f'Detected color: {color_detected.h}, {color_detected.s}, {color_detected.v}') + if color_reflected_percent > 0: + if color_detected == Color.GREEN: + print('Running Mission 1') + await Run1() + await celebrate_mission_complete(CelebrationSound.VICTORY_FANFARE) + elif color_detected == Color.WHITE: + print('Running Mission 2') + await Run2() + await celebrate_mission_complete(CelebrationSound.RICKROLL_INSPIRED) + elif color_detected == Color.YELLOW: + print('Running Mission 3') + await Run3() + await celebrate_mission_complete(CelebrationSound.SUCCESS_CHIME ) + elif color_detected == Color.BLUE: + print('Running Mission 4') + await Run4() + await celebrate_mission_complete(CelebrationSound.POWER_UP) + elif color_detected == Color.RED: + print('Running Mission 5') + await Run5() + await celebrate_mission_complete(CelebrationSound.LEVEL_UP) + else: + hub.light.off() + left_motor.stop() + right_motor.stop() + await wait(1000) #prevent loop from iterating fast +# Main execution loop +run_task(main()) -- 2.49.1 From 29bd9f0e23b4be6da0dbf1bf0ac068e20535e5c6 Mon Sep 17 00:00:00 2001 From: Rishikesh Lolapu <31lolapr@elmbrookstudents.org> Date: Fri, 10 Oct 2025 21:27:24 +0000 Subject: [PATCH 11/70] Update final/main5.py --- final/main5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/final/main5.py b/final/main5.py index 73e506e..6de5776 100644 --- a/final/main5.py +++ b/final/main5.py @@ -273,6 +273,6 @@ async def main(): hub.light.off() left_motor.stop() right_motor.stop() - await wait(1000) #prevent loop from iterating fast + await wait(100) #prevent loop from iterating fast # Main execution loop run_task(main()) -- 2.49.1 From 7e2dc0b7c99eca606458f95a1b2072378c368b22 Mon Sep 17 00:00:00 2001 From: Rishikesh Lolapu <31lolapr@elmbrookstudents.org> Date: Fri, 10 Oct 2025 21:44:03 +0000 Subject: [PATCH 12/70] Update final/main5.py --- final/main5.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/final/main5.py b/final/main5.py index 6de5776..2b0fcd6 100644 --- a/final/main5.py +++ b/final/main5.py @@ -219,7 +219,7 @@ async def Run4(): await drive_base.straight(250) await right_arm.run_angle(100, -300) await drive_base.straight(30) - await right_arm.run_angle(50,-300) + await right_arm.run_angle(50,-250) await drive_base.turn(30) await drive_base.straight(-200) await drive_base.turn(-50) @@ -273,6 +273,6 @@ async def main(): hub.light.off() left_motor.stop() right_motor.stop() - await wait(100) #prevent loop from iterating fast + await wait(1000) #prevent loop from iterating fast # Main execution loop run_task(main()) -- 2.49.1 From 8391619c717ed4ce6f26fc4fe5823d0b69162012 Mon Sep 17 00:00:00 2001 From: Rishikesh Lolapu <31lolapr@elmbrookstudents.org> Date: Sat, 11 Oct 2025 15:24:59 +0000 Subject: [PATCH 13/70] Add members/Rishi.txt --- members/Rishi.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 members/Rishi.txt diff --git a/members/Rishi.txt b/members/Rishi.txt new file mode 100644 index 0000000..e69de29 -- 2.49.1 From ae114667f1651d0c7eb510cbe1c7f2e8fd83661b Mon Sep 17 00:00:00 2001 From: Rishikesh Lolapu <31lolapr@elmbrookstudents.org> Date: Sat, 11 Oct 2025 15:27:44 +0000 Subject: [PATCH 14/70] Update members/Rishi.txt --- members/Rishi.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/members/Rishi.txt b/members/Rishi.txt index e69de29..88bea53 100644 --- a/members/Rishi.txt +++ b/members/Rishi.txt @@ -0,0 +1,2 @@ +Hi I'm Rishi, the coding manager for Team: 65266 +I love coding and making things that probably end the world. \ No newline at end of file -- 2.49.1 From 1a3abbb4d14f70b83109edd793afbe650a1bc40c Mon Sep 17 00:00:00 2001 From: Rishikesh Lolapu <31lolapr@elmbrookstudents.org> Date: Sat, 11 Oct 2025 18:03:55 +0000 Subject: [PATCH 15/70] Update twist_scrimmage.py --- twist_scrimmage.py | 389 +++++++++++++++++++-------------------------- 1 file changed, 163 insertions(+), 226 deletions(-) diff --git a/twist_scrimmage.py b/twist_scrimmage.py index b796f44..2b0fcd6 100644 --- a/twist_scrimmage.py +++ b/twist_scrimmage.py @@ -1,11 +1,9 @@ -# Imports... because we kinda need them... from pybricks.hubs import PrimeHub from pybricks.pupdevices import Motor, ColorSensor from pybricks.parameters import Port, Stop, Color, Direction from pybricks.robotics import DriveBase from pybricks.tools import wait, StopWatch, multitask, run_task -# Sets all the default values for the runs hub = PrimeHub() left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) right_motor = Motor(Port.B) @@ -17,59 +15,157 @@ drive_base.use_gyro(True) color_sensor = ColorSensor(Port.F) Color.ORANGE = Color(37, 85, 95) Color.BLUE = Color(230,100,100) -Color.YELLOW = Color(53, 75, 84) -color_sensor.detectable_colors([Color.YELLOW, Color.BLUE, Color.GREEN, Color.WHITE, Color.RED, Color.ORANGE, Color.NONE]) +color_sensor.detectable_colors([Color.ORANGE, Color.BLUE, Color.GREEN, Color.WHITE, Color.RED, Color.YELLOW]) hub.speaker.volume(50) # Set the volume of the speaker color_sensor.detectable_colors() +# Celebration sound types +class CelebrationSound: + VICTORY_FANFARE = 0 + LEVEL_UP = 1 + SUCCESS_CHIME = 2 + TA_DA = 3 + POWER_UP = 4 + RICKROLL_INSPIRED = 5 + +async def play_victory_fanfare(): + """Classic victory fanfare""" + notes = [ + (262, 200), # C4 + (262, 200), # C4 + (262, 200), # C4 + (349, 600), # F4 + ] + + for freq, duration in notes: + await hub.speaker.beep(freq, duration) + await wait(50) +async def play_level_up(): + """Upward scale for level completion""" + notesold = [ + (262, 100), # C4 + (294, 100), # D4 + (330, 100), # E4 + (349, 100), # F4 + (392, 100), # G4 + (440, 100), # A4 + (494, 100), # B4 + (523, 300), # C5 + ] + notes = [ + (277, 100), + (330, 100), + (277, 100), + (554, 100), + (277, 100), + (413, 100), + (330, 100), + (277, 100), + (413, 100), + (277, 100), + (554, 100), + (413, 100), + (277, 100), + (413, 100), + (554, 100), + (413, 100) + ] + + for freq, duration in notes: + await hub.speaker.beep(freq, duration) + #await wait(20) +async def play_success_chime(): + """Simple success notification""" + notes = [ + (523, 150), # C5 + (659, 150), # E5 + (784, 300), # G5 + ] + + for freq, duration in notes: + await hub.speaker.beep(freq, duration) + await wait(50) +async def play_ta_da(): + """Classic "ta-da!" sound""" + notes = [ + (392, 200), # G4 + (523, 400), # C5 + ] + + for freq, duration in notes: + await hub.speaker.beep(freq, duration) + await wait(100) +async def play_power_up(): + """Rising power-up sound""" + for freq in range(200, 800, 50): + await hub.speaker.beep(freq, 50) + await wait(10) + await hub.speaker.beep(1000, 200) +async def play_rickroll_inspired(): + """Fun 80s-style dance beat inspired sound""" + # Upbeat bouncy rhythm + pattern = [ + (392, 200), (440, 200), (494, 200), (523, 200), + (440, 200), (392, 200), (349, 200), (392, 300), + (440, 200), (392, 200), (349, 200), (330, 400), + ] + + for freq, duration in pattern: + await hub.speaker.beep(freq, duration) + await wait(50) +async def celebrate_mission_complete(sound_type=CelebrationSound.SUCCESS_CHIME): + """ + Main celebration function to call after completing a mission. + Plays a sound and shows light animation. + + Args: + sound_type: CelebrationSound enum value (default: SUCCESS_CHIME) + """ + # Light show + hub.light.on(Color.GREEN) + + # Play the selected celebration sound + if sound_type == CelebrationSound.VICTORY_FANFARE: + await play_victory_fanfare() + elif sound_type == CelebrationSound.LEVEL_UP: + await play_level_up() + elif sound_type == CelebrationSound.SUCCESS_CHIME: + await play_success_chime() + elif sound_type == CelebrationSound.TA_DA: + await play_ta_da() + elif sound_type == CelebrationSound.POWER_UP: + await play_power_up() + elif sound_type == CelebrationSound.RICKROLL_INSPIRED: + await play_rickroll_inspired() + else: + await play_success_chime() # Default fallback + + # Blink the light + for _ in range(3): + hub.light.off() + await wait(100) + hub.light.on(Color.GREEN) + await wait(100) + + hub.light.off() -# Notes to hertz for nice music -cn = { - "Cs3": 138.59, - "D3": 146.83, - "Ds3": 155.56, - "E3": 164.81, - "F3": 174.61, - "Fs3": 185.00, - "G3": 196.00, - "Gs3": 207.65, - "A3": 220.00, - "As3": 233.08, - "B3": 246.94, - "C4": 261.63, - "Cs4": 277.18, - "D4": 293.66, - "Ds4": 311.13, - "E4": 329.63, - "F4": 349.23, - "Fs4": 369.99, - "G4": 392.00, - "Gs4": 415.30, - "A4": 440.00, - "As4": 466.16, - "B4": 493.88, - "C5": 523.25, - "Cs5": 554.37 -} - - -# RUNS - contains the mission code that will be executed on color sensor detection async def Run1(): - left_arm.run_angle(1000, 300) - right_arm.run_angle(1000,500) + await multitask(left_arm.run_angle(1000, 300), right_arm.run_angle(1000,500)) await drive_base.straight(320) + await right_arm.run_angle(5000,-500, Stop.HOLD) await right_arm.run_angle(5000,500, Stop.HOLD) await right_arm.run_angle(5000,-500, Stop.HOLD) await right_arm.run_angle(5000,500, Stop.HOLD) await right_arm.run_angle(5000,-500, Stop.HOLD) + await drive_base.turn(-20) - await drive_base.straight(277) + await drive_base.straight(275) await drive_base.turn(20) - await drive_base.straight(65) - await drive_base.turn(-30) - right_arm.run_angle(50,500) + await drive_base.straight(63) + + await multitask(drive_base.turn(-30), right_arm.run_angle(50,500)) await drive_base.turn(45) - await drive_base.straight(-145) + await drive_base.straight(-135) await drive_base.turn(-60) await drive_base.straight(90) await left_arm.run_angle(1000,-450) @@ -77,31 +173,32 @@ async def Run1(): await left_arm.run_angle(1000,450) await drive_base.straight(10) await drive_base.turn(35) - await drive_base.straight(-600) + await drive_base.straight(-500) async def Run2(): await drive_base.straight(200) await drive_base.turn(-20) await drive_base.straight(525) await drive_base.turn(60) + await drive_base.straight(50) await right_arm.run_angle(2000,1000) await drive_base.straight(-50) await drive_base.turn(45) await drive_base.straight(50) await right_arm.run_angle(350,-1000) - await drive_base.straight(-100) + await drive_base.turn(-100) await drive_base.straight(-600) + async def Run3(): - await drive_base.straight(920) + await drive_base.straight(915) await drive_base.turn(-90) await drive_base.straight(60) - drive_base.turn(-10) - await left_arm.run_angle(10000,-4000) - await drive_base.straight(-110) - await drive_base.turn(90) + await left_arm.run_angle(10000,-15000) + await drive_base.straight(-60) + await drive_base.turn(85) await drive_base.straight(2000) async def Run4(): @@ -135,177 +232,22 @@ async def Run5(): await right_arm.run_angle(300, 100) await drive_base.straight(-350) + async def Run6(): - left_arm.run_angle(500,200) - right_arm.run_angle(500,200) - await drive_base.straight(70) - await drive_base.turn(-55) - await drive_base.straight(900) - await drive_base.turn(92.5) - await drive_base.straight(75) - await drive_base.straight(21) - await right_arm.run_angle(500,-250) - await right_arm.run_angle(500,250) - await drive_base.straight(-20) - await drive_base.turn(55) - await left_arm.run_angle(300,-400) - await drive_base.turn(70) - await left_arm.run_angle(300,400) - await drive_base.turn(-60) - await drive_base.straight(900) - -# Celebration sound types -class CelebrationSound: - VICTORY_FANFARE = 0 - WAITING_SOUND = 1 - SUCCESS_CHIME = 2 - TA_DA = 3 - POWER_UP = 4 - RICKROLL_INSPIRED = 5 - -# Sounds functions -async def play_victory_fanfare(): - """Classic victory fanfare""" - notes = [ - (cn["B3"], 200), - (cn["B3"], 100), - (cn["B3"], 100), - (cn["E4"], 600) - ] - - for freq, duration in notes: - await hub.speaker.beep(freq, duration) - await wait(50) -async def play_waiting_sound(): - - # T3rm1na1 V3l0c1ty arpeggio recreated in pybricks - notes = [ - (cn["Cs4"], 100), - (cn["E4"], 100), - (cn["Cs4"], 100), - (cn["Cs5"], 100), - (cn["Cs4"], 100), - (cn["Gs4"], 100), - (cn["E4"], 100), - (cn["Cs4"], 100), - (cn["Gs4"], 100), - (cn["Cs4"], 100), - (cn["Cs5"], 100), - (cn["Gs4"], 100), - (cn["Cs4"], 100), - (cn["Gs4"], 100), - (cn["Cs5"], 100), - (cn["Gs4"], 100) - ] - - - for freq, duration in notes: - await hub.speaker.beep(freq, duration) -async def play_success_chime(): - """Simple success notification""" - notes = [ - (cn["E4"], 150), - (cn["Gs4"], 150), - (cn["B4"], 300), - ] - - - for freq, duration in notes: - await hub.speaker.beep(freq, duration) - await wait(50) -async def play_ta_da(): - """Classic "ta-da!" sound""" - notes = [ - (cn["Cs4"], 200), - (cn["Ds4"], 200), - (cn["E4"], 200), - (cn["Ds4"], 200), - (cn["E4"], 200), - (cn["Fs4"], 400), - (cn["Gs4"], 600), - (cn["Fs4"], 400), - (cn["Gs4"], 200), - (cn["A4"], 200), - (cn["B4"], 200), - (cn["C5"], 200), - (cn["Cs5"], 200) - ] - - for freq, duration in notes: - await hub.speaker.beep(freq, duration) - #await wait(100) -async def play_power_up(): - """Rising power-up sound""" - frequencies = [ - 164.81, 207.65, 246.94, 329.63, 415.30, 493.88 - ] - - for freq in frequencies: - await hub.speaker.beep(freq, 50) - await wait(10) - - - await hub.speaker.beep(659.24, 200) -async def play_rickroll_inspired(): - """Fun 80s-style dance beat inspired sound""" - # Upbeat bouncy rhythm - pattern = [ (cn["B3"], 100), (cn["Cs4"], 100), (cn["Ds4"], 100), (cn["E4"], 100), (cn["Cs4"], 100), (cn["B3"], 100), (cn["A3"], 100), (cn["B3"], 200), (cn["Cs4"], 100), (cn["B3"], 100), (cn["A3"], 100), (cn["Gs3"], 200), ] - - - - for freq, duration in pattern: - await hub.speaker.beep(freq, duration) - #await wait(50) - -# Basically a big if else statement that calls the functions above -async def celebrate_mission_complete(sound_type=CelebrationSound.RICKROLL_INSPIRED): - """ - Main celebration function to call after completing a mission. - Plays a sound and shows light animation. - - Args: - sound_type: CelebrationSound enum value (default: SUCCESS_CHIME) - """ - # Light show - hub.light.on(Color.GREEN) - - # Play the selected celebration sound - if sound_type == CelebrationSound.VICTORY_FANFARE: - await play_victory_fanfare() - elif sound_type == CelebrationSound.WAITING_SOUND: - await play_waiting_sound() - elif sound_type == CelebrationSound.SUCCESS_CHIME: - await play_success_chime() - elif sound_type == CelebrationSound.TA_DA: - await play_ta_da() - elif sound_type == CelebrationSound.POWER_UP: - await play_power_up() - elif sound_type == CelebrationSound.RICKROLL_INSPIRED: - await play_rickroll_inspired() - else: - await play_success_chime() # Default fallback - - # Blink the light - for _ in range(3): - hub.light.off() - await wait(100) - hub.light.on(Color.GREEN) - await wait(100) - - hub.light.off() - -# This where everything happens + await drive_base.straight(420) + await right_arm.run_angle(300,-100) + await drive_base.straight(-100) + await right_arm.run_angle(300, 100) + await drive_base.straight(-350) async def main(): - # MAIN LOOP while True: - await celebrate_mission_complete(CelebrationSound.RICKROLL_INSPIRED) + + await celebrate_mission_complete(CelebrationSound.LEVEL_UP) color_reflected_percent = await color_sensor.reflection() - print(f"Color reflection percentage: {color_reflected_percent}") + print(color_reflected_percent) color_detected = await color_sensor.color() - print(f'Detected color: {color_detected}') - hsv = await color_sensor.hsv() - print(f"Measured HSV: {hsv}") + print(f'Detected color: {color_detected.h}, {color_detected.s}, {color_detected.v}') if color_reflected_percent > 0: if color_detected == Color.GREEN: print('Running Mission 1') @@ -318,24 +260,19 @@ async def main(): elif color_detected == Color.YELLOW: print('Running Mission 3') await Run3() - await celebrate_mission_complete(CelebrationSound.SUCCESS_CHIME) - elif color_detected == Color.ORANGE: + await celebrate_mission_complete(CelebrationSound.SUCCESS_CHIME ) + elif color_detected == Color.BLUE: print('Running Mission 4') await Run4() await celebrate_mission_complete(CelebrationSound.POWER_UP) - elif color_detected == Color.BLUE: + elif color_detected == Color.RED: print('Running Mission 5') await Run5() - await celebrate_mission_complete(CelebrationSound.POWER_UP) - elif color_detected == Color.RED: - print('Running Mission 6') - await Run6() - await celebrate_mission_complete(CelebrationSound.TA_DA) + await celebrate_mission_complete(CelebrationSound.LEVEL_UP) else: hub.light.off() left_motor.stop() right_motor.stop() - else: - print("No color was detected.") - await wait(100) # prevent loop from iterating fast -run_task(main()) \ No newline at end of file + await wait(1000) #prevent loop from iterating fast +# Main execution loop +run_task(main()) -- 2.49.1 From 9b04c18889b21db32c2f003b8a77572d201b0698 Mon Sep 17 00:00:00 2001 From: Atharv <30nagava@elmbrookstudents.org> Date: Sat, 11 Oct 2025 18:22:21 +0000 Subject: [PATCH 16/70] Update for contest --- twist_scrimmage.py | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/twist_scrimmage.py b/twist_scrimmage.py index 2b0fcd6..1e2d7f1 100644 --- a/twist_scrimmage.py +++ b/twist_scrimmage.py @@ -149,23 +149,22 @@ async def celebrate_mission_complete(sound_type=CelebrationSound.SUCCESS_CHIME): hub.light.off() async def Run1(): - await multitask(left_arm.run_angle(1000, 300), right_arm.run_angle(1000,500)) + left_arm.run_angle(1000, 300) + right_arm.run_angle(1000,500) await drive_base.straight(320) - await right_arm.run_angle(5000,-500, Stop.HOLD) await right_arm.run_angle(5000,500, Stop.HOLD) await right_arm.run_angle(5000,-500, Stop.HOLD) await right_arm.run_angle(5000,500, Stop.HOLD) await right_arm.run_angle(5000,-500, Stop.HOLD) - await drive_base.turn(-20) - await drive_base.straight(275) + await drive_base.straight(277) await drive_base.turn(20) - await drive_base.straight(63) - - await multitask(drive_base.turn(-30), right_arm.run_angle(50,500)) + await drive_base.straight(65) + await drive_base.turn(-30) + right_arm.run_angle(50,500) await drive_base.turn(45) - await drive_base.straight(-135) + await drive_base.straight(-145) await drive_base.turn(-60) await drive_base.straight(90) await left_arm.run_angle(1000,-450) @@ -173,7 +172,7 @@ async def Run1(): await left_arm.run_angle(1000,450) await drive_base.straight(10) await drive_base.turn(35) - await drive_base.straight(-500) + await drive_base.straight(-600) async def Run2(): await drive_base.straight(200) @@ -187,18 +186,19 @@ async def Run2(): await drive_base.turn(45) await drive_base.straight(50) await right_arm.run_angle(350,-1000) - + await drive_base.straight(-100) await drive_base.turn(-100) await drive_base.straight(-600) async def Run3(): - await drive_base.straight(915) + await drive_base.straight(920) await drive_base.turn(-90) await drive_base.straight(60) - await left_arm.run_angle(10000,-15000) - await drive_base.straight(-60) - await drive_base.turn(85) + drive_base.turn(-10) + await left_arm.run_angle(10000,-4000) + await drive_base.straight(-110) + await drive_base.turn(90) await drive_base.straight(2000) async def Run4(): @@ -242,7 +242,7 @@ async def Run6(): async def main(): while True: - await celebrate_mission_complete(CelebrationSound.LEVEL_UP) + #await celebrate_mission_complete(CelebrationSound.LEVEL_UP) color_reflected_percent = await color_sensor.reflection() print(color_reflected_percent) @@ -252,23 +252,23 @@ async def main(): if color_detected == Color.GREEN: print('Running Mission 1') await Run1() - await celebrate_mission_complete(CelebrationSound.VICTORY_FANFARE) + #await celebrate_mission_complete(CelebrationSound.VICTORY_FANFARE) elif color_detected == Color.WHITE: print('Running Mission 2') await Run2() - await celebrate_mission_complete(CelebrationSound.RICKROLL_INSPIRED) + #await celebrate_mission_complete(CelebrationSound.RICKROLL_INSPIRED) elif color_detected == Color.YELLOW: print('Running Mission 3') await Run3() - await celebrate_mission_complete(CelebrationSound.SUCCESS_CHIME ) + #await celebrate_mission_complete(CelebrationSound.SUCCESS_CHIME ) elif color_detected == Color.BLUE: print('Running Mission 4') await Run4() - await celebrate_mission_complete(CelebrationSound.POWER_UP) + #await celebrate_mission_complete(CelebrationSound.POWER_UP) elif color_detected == Color.RED: print('Running Mission 5') await Run5() - await celebrate_mission_complete(CelebrationSound.LEVEL_UP) + #await celebrate_mission_complete(CelebrationSound.LEVEL_UP) else: hub.light.off() left_motor.stop() -- 2.49.1 From 19afacd87b641facc594d031b8cf261aff30288b Mon Sep 17 00:00:00 2001 From: Atharv <30nagava@elmbrookstudents.org> Date: Sat, 11 Oct 2025 18:47:09 +0000 Subject: [PATCH 17/70] Scrimmage update after run 2 well at least yellow works now. --- twist_scrimmage.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/twist_scrimmage.py b/twist_scrimmage.py index 1e2d7f1..9e066f7 100644 --- a/twist_scrimmage.py +++ b/twist_scrimmage.py @@ -15,6 +15,7 @@ drive_base.use_gyro(True) color_sensor = ColorSensor(Port.F) Color.ORANGE = Color(37, 85, 95) Color.BLUE = Color(230,100,100) +Color.YELLOW = Color(37, 85, 95) color_sensor.detectable_colors([Color.ORANGE, Color.BLUE, Color.GREEN, Color.WHITE, Color.RED, Color.YELLOW]) hub.speaker.volume(50) # Set the volume of the speaker color_sensor.detectable_colors() @@ -149,7 +150,7 @@ async def celebrate_mission_complete(sound_type=CelebrationSound.SUCCESS_CHIME): hub.light.off() async def Run1(): - left_arm.run_angle(1000, 300) + left_arm.run_angle(1000, -300) right_arm.run_angle(1000,500) await drive_base.straight(320) await right_arm.run_angle(5000,-500, Stop.HOLD) @@ -167,12 +168,12 @@ async def Run1(): await drive_base.straight(-145) await drive_base.turn(-60) await drive_base.straight(90) - await left_arm.run_angle(1000,-450) + await left_arm.run_angle(1000, 450) await drive_base.straight(-145) - await left_arm.run_angle(1000,450) + await left_arm.run_angle(1000,-450) await drive_base.straight(10) await drive_base.turn(35) - await drive_base.straight(-600) + await drive_base.straight(-700) async def Run2(): await drive_base.straight(200) @@ -188,7 +189,7 @@ async def Run2(): await right_arm.run_angle(350,-1000) await drive_base.straight(-100) await drive_base.turn(-100) - await drive_base.straight(-600) + await drive_base.straight(-750) async def Run3(): @@ -248,7 +249,7 @@ async def main(): color_detected = await color_sensor.color() print(f'Detected color: {color_detected.h}, {color_detected.s}, {color_detected.v}') - if color_reflected_percent > 0: + if color_reflected_percent > 1: if color_detected == Color.GREEN: print('Running Mission 1') await Run1() -- 2.49.1 From 5e1f3098f9bd07bf80bfeec1d8959ea6ff06b41a Mon Sep 17 00:00:00 2001 From: Atharv <30nagava@elmbrookstudents.org> Date: Sat, 11 Oct 2025 19:08:38 +0000 Subject: [PATCH 18/70] Changes after scrimmage run 3 --- twist_scrimmage.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/twist_scrimmage.py b/twist_scrimmage.py index 9e066f7..8f68b24 100644 --- a/twist_scrimmage.py +++ b/twist_scrimmage.py @@ -204,26 +204,28 @@ async def Run3(): async def Run4(): await drive_base.straight(519) - await left_arm.run_angle(300, -100) - await left_arm.run_angle(300, 500) + await left_arm.run_angle(300, -200) + await left_arm.run_angle(800, 1000) await drive_base.straight(180) await drive_base.turn(-37) + await right_arm.run_angle(300, -50) await drive_base.straight(50) - await right_arm.run_angle(300, -400) + await right_arm.run_angle(300, -350) await drive_base.straight(-150) await drive_base.turn(125) await drive_base.straight(50) await right_arm.run_angle(300, 400) await drive_base.straight(-75) - await right_arm.run_angle(300, 300) + await right_arm.run_angle(300, -200) await drive_base.turn(-40) - await drive_base.straight(250) + await right_arm.run_angle(300, 250) + await drive_base.straight(260) await right_arm.run_angle(100, -300) await drive_base.straight(30) await right_arm.run_angle(50,-250) await drive_base.turn(30) await drive_base.straight(-200) - await drive_base.turn(-50) + await drive_base.turn(-67) await drive_base.straight(-800) async def Run5(): -- 2.49.1 From 8061eb71d552c80a18683aed7ae5b442cb8ce31e Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Fri, 17 Oct 2025 20:51:55 +0000 Subject: [PATCH 19/70] Add missions/Boat_mission.py --- missions/Boat_mission.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 missions/Boat_mission.py diff --git a/missions/Boat_mission.py b/missions/Boat_mission.py new file mode 100644 index 0000000..6d87949 --- /dev/null +++ b/missions/Boat_mission.py @@ -0,0 +1,27 @@ +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 +from pybricks.tools import run_task,multitask + +hub = PrimeHub() + +left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) +right_motor = Motor(Port.B) +left_arm = Motor(Port.C, Direction.COUNTERCLOCKWISE) +right_arm = Motor(Port.D) + +drive_base = DriveBase(left_motor, right_motor, wheel_diameter=68.8, axle_track=180) + +drive_base.settings(880,850,700,700) + +drive_base.use_gyro(True) + +first_run = True + +async def main(): + await drive_base.straight(750) + await drive_base.straight(-650) + +run_task(main()) \ No newline at end of file -- 2.49.1 From f69c61e796eb8726e00d0db5914ed46a95c564ca Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Fri, 17 Oct 2025 20:52:24 +0000 Subject: [PATCH 20/70] Add missions/Sand_mission.py --- missions/Sand_mission.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 missions/Sand_mission.py diff --git a/missions/Sand_mission.py b/missions/Sand_mission.py new file mode 100644 index 0000000..368ba5c --- /dev/null +++ b/missions/Sand_mission.py @@ -0,0 +1,29 @@ +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 +from pybricks.tools import run_task,multitask + +hub = PrimeHub() + +left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) +right_motor = Motor(Port.B) +left_arm = Motor(Port.C, Direction.COUNTERCLOCKWISE) +right_arm = Motor(Port.D) + +drive_base = DriveBase(left_motor, right_motor, wheel_diameter=68.8, axle_track=180) + +drive_base.settings(400,500,100,100) + +drive_base.use_gyro(True) + + +async def main(): + await drive_base.straight(500) + await right_arm.run_angle(300,100) + await drive_base.straight(-100) + await right_arm.run_angle(300,-100) + await drive_base.straight(-350) + +run_task(main()) \ No newline at end of file -- 2.49.1 From bbbfe0078c61fb98590e04c5de2f1c41a6725e5e Mon Sep 17 00:00:00 2001 From: Atharv <30nagava@elmbrookstudents.org> Date: Fri, 17 Oct 2025 21:58:44 +0000 Subject: [PATCH 21/70] Add test_10_17_2025.py um so i was testing the colors and IMMA GO insane so lemme check my lego bin for something that will work. --- test_10_17_2025.py | 300 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 300 insertions(+) create mode 100644 test_10_17_2025.py diff --git a/test_10_17_2025.py b/test_10_17_2025.py new file mode 100644 index 0000000..a9994ae --- /dev/null +++ b/test_10_17_2025.py @@ -0,0 +1,300 @@ +from pybricks.hubs import PrimeHub +from pybricks.pupdevices import Motor, ColorSensor +from pybricks.parameters import Port, Stop, Color, Direction +from pybricks.robotics import DriveBase +from pybricks.tools import wait, StopWatch, multitask, run_task + +hub = PrimeHub() +left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) +right_motor = Motor(Port.B) +left_arm = Motor(Port.C)#, Direction.COUNTERCLOCKWISE) +right_arm = Motor(Port.D) +drive_base = DriveBase(left_motor, right_motor, wheel_diameter=68.8, axle_track=180) +drive_base.settings(550,700,100,100) +drive_base.use_gyro(True) +color_sensor = ColorSensor(Port.F) +Color.ORANGE = Color(28, 61, 61) +Color.BLUE = Color(230,100,100) +Color.YELLOW = Color(37, 85, 95) +Color.PURPLE = Color(326, 60, 87) +color_sensor.detectable_colors([Color.ORANGE, Color.BLUE, Color.GREEN, Color.WHITE, Color.RED, Color.YELLOW, Color.NONE, Color.PURPLE]) +hub.speaker.volume(50) # Set the volume of the speaker +color_sensor.detectable_colors() +# Celebration sound types +class CelebrationSound: + VICTORY_FANFARE = 0 + LEVEL_UP = 1 + SUCCESS_CHIME = 2 + TA_DA = 3 + POWER_UP = 4 + RICKROLL_INSPIRED = 5 + +async def play_victory_fanfare(): + """Classic victory fanfare""" + notes = [ + (262, 200), # C4 + (262, 200), # C4 + (262, 200), # C4 + (349, 600), # F4 + ] + + for freq, duration in notes: + await hub.speaker.beep(freq, duration) + await wait(50) +async def play_level_up(): + """Upward scale for level completion""" + notesold = [ + (262, 100), # C4 + (294, 100), # D4 + (330, 100), # E4 + (349, 100), # F4 + (392, 100), # G4 + (440, 100), # A4 + (494, 100), # B4 + (523, 300), # C5 + ] + notes = [ + (277, 100), + (330, 100), + (277, 100), + (554, 100), + (277, 100), + (413, 100), + (330, 100), + (277, 100), + (413, 100), + (277, 100), + (554, 100), + (413, 100), + (277, 100), + (413, 100), + (554, 100), + (413, 100) + ] + + for freq, duration in notes: + await hub.speaker.beep(freq, duration) + #await wait(20) +async def play_success_chime(): + """Simple success notification""" + notes = [ + (523, 150), # C5 + (659, 150), # E5 + (784, 300), # G5 + ] + + for freq, duration in notes: + await hub.speaker.beep(freq, duration) + await wait(50) +async def play_ta_da(): + """Classic "ta-da!" sound""" + notes = [ + (392, 200), # G4 + (523, 400), # C5 + ] + + for freq, duration in notes: + await hub.speaker.beep(freq, duration) + await wait(100) +async def play_power_up(): + """Rising power-up sound""" + for freq in range(200, 800, 50): + await hub.speaker.beep(freq, 50) + await wait(10) + await hub.speaker.beep(1000, 200) +async def play_rickroll_inspired(): + """Fun 80s-style dance beat inspired sound""" + # Upbeat bouncy rhythm + pattern = [ + (392, 200), (440, 200), (494, 200), (523, 200), + (440, 200), (392, 200), (349, 200), (392, 300), + (440, 200), (392, 200), (349, 200), (330, 400), + ] + + for freq, duration in pattern: + await hub.speaker.beep(freq, duration) + await wait(50) +async def celebrate_mission_complete(sound_type=CelebrationSound.SUCCESS_CHIME): + """ + Main celebration function to call after completing a mission. + Plays a sound and shows light animation. + + Args: + sound_type: CelebrationSound enum value (default: SUCCESS_CHIME) + """ + # Light show + hub.light.on(Color.GREEN) + + # Play the selected celebration sound + if sound_type == CelebrationSound.VICTORY_FANFARE: + await play_victory_fanfare() + elif sound_type == CelebrationSound.LEVEL_UP: + await play_level_up() + elif sound_type == CelebrationSound.SUCCESS_CHIME: + await play_success_chime() + elif sound_type == CelebrationSound.TA_DA: + await play_ta_da() + elif sound_type == CelebrationSound.POWER_UP: + await play_power_up() + elif sound_type == CelebrationSound.RICKROLL_INSPIRED: + await play_rickroll_inspired() + else: + await play_success_chime() # Default fallback + + # Blink the light + for _ in range(3): + hub.light.off() + await wait(100) + hub.light.on(Color.GREEN) + await wait(100) + + hub.light.off() + +async def Run1(): + left_arm.run_angle(1000, -300) + right_arm.run_angle(1000,500) + await drive_base.straight(320) + await right_arm.run_angle(5000,-500, Stop.HOLD) + await right_arm.run_angle(5000,500, Stop.HOLD) + await right_arm.run_angle(5000,-500, Stop.HOLD) + await right_arm.run_angle(5000,500, Stop.HOLD) + await right_arm.run_angle(5000,-500, Stop.HOLD) + await drive_base.turn(-20) + await drive_base.straight(277) + await drive_base.turn(20) + await drive_base.straight(65) + await drive_base.turn(-30) + right_arm.run_angle(50,500) + await drive_base.turn(45) + await drive_base.straight(-145) + await drive_base.turn(-60) + await drive_base.straight(90) + await left_arm.run_angle(1000, 450) + await drive_base.straight(-145) + await left_arm.run_angle(1000,-450) + await drive_base.straight(10) + await drive_base.turn(35) + await drive_base.straight(-700) + +async def Run2(): + await drive_base.straight(200) + await drive_base.turn(-20) + await drive_base.straight(525) + await drive_base.turn(60) + + await drive_base.straight(50) + await right_arm.run_angle(2000,1000) + await drive_base.straight(-50) + await drive_base.turn(45) + await drive_base.straight(50) + await right_arm.run_angle(350,-1000) + await drive_base.straight(-100) + await drive_base.turn(-100) + await drive_base.straight(-750) + + +async def Run3(): + await drive_base.straight(920) + await drive_base.turn(-90) + await drive_base.straight(60) + drive_base.turn(-10) + await left_arm.run_angle(10000,-4000) + await drive_base.straight(-110) + await drive_base.turn(90) + await drive_base.straight(2000) + +async def Run4(): + await drive_base.straight(519) + await left_arm.run_angle(300, -200) + await left_arm.run_angle(800, 1000) + await drive_base.straight(180) + await drive_base.turn(-37) + await right_arm.run_angle(300, -50) + await drive_base.straight(50) + await right_arm.run_angle(300, -350) + await drive_base.straight(-150) + await drive_base.turn(125) + await drive_base.straight(50) + await right_arm.run_angle(300, 400) + await drive_base.straight(-75) + await right_arm.run_angle(300, -200) + await drive_base.turn(-40) + await right_arm.run_angle(300, 250) + await drive_base.straight(260) + await right_arm.run_angle(100, -300) + await drive_base.straight(30) + await right_arm.run_angle(50,-250) + await drive_base.turn(30) + await drive_base.straight(-200) + await drive_base.turn(-67) + await drive_base.straight(-800) + +async def Run5(): + await drive_base.straight(420) + await right_arm.run_angle(300,-100) + await drive_base.straight(-100) + await right_arm.run_angle(300, 100) + await drive_base.straight(-350) + + +async def Run6(): + left_arm.run_angle(500,200) + right_arm.run_angle(500,200) + await drive_base.straight(70) + + await drive_base.turn(-55) + await drive_base.straight(900) + await drive_base.turn(92.5) + + await drive_base.straight(75) + await drive_base.straight(21) + await right_arm.run_angle(500,-250) + await right_arm.run_angle(500,250) + await drive_base.turn(55) + + await left_arm.run_angle(300,-400) + + await drive_base.turn(46.5) + await drive_base.turn(-40) + await drive_base.straight(900) +async def main(): + while True: + + #await celebrate_mission_complete(CelebrationSound.LEVEL_UP) + color_reflected_percent = await color_sensor.reflection() + print(color_reflected_percent) + + color_detected = await color_sensor.color() + print(f'Detected color: {color_detected.h}, {color_detected.s}, {color_detected.v}') + if color_reflected_percent > 1: + if color_detected == Color.GREEN: + print('Running Mission 1') + await Run1() + #await celebrate_mission_complete(CelebrationSound.VICTORY_FANFARE) + elif color_detected == Color.WHITE: + print('Running Mission 2') + await Run2() + #await celebrate_mission_complete(CelebrationSound.RICKROLL_INSPIRED) + elif color_detected == Color.YELLOW: + print('Running Mission 3') + await Run3() + #await celebrate_mission_complete(CelebrationSound.SUCCESS_CHIME ) + elif color_detected == Color.BLUE: + print('Running Mission 4') + await Run4() + #await celebrate_mission_complete(CelebrationSound.POWER_UP) + elif color_detected == Color.ORANGE: + print('Running Mission 5') + await Run5() + #await celebrate_mission_complete(CelebrationSound.LEVEL_UP) + elif color_detected == Color.PURPLE: + print('Running Mission 6 (this is ayaan\'s code)') + await Run6() + #await celebrate_mission_complete(CelebrationSound.LEVEL_UP) + else: + hub.light.off() + left_motor.stop() + right_motor.stop() + await wait(1000) #prevent loop from iterating fast +# Main execution loop +run_task(main()) -- 2.49.1 From 8667a66ab10b25be8df6e79065113cd3e859977b Mon Sep 17 00:00:00 2001 From: Rishikesh Lolapu <31lolapr@elmbrookstudents.org> Date: Sat, 18 Oct 2025 14:51:46 +0000 Subject: [PATCH 22/70] Add sechs-sieben.py --- sechs-sieben.py | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 sechs-sieben.py diff --git a/sechs-sieben.py b/sechs-sieben.py new file mode 100644 index 0000000..7d84ee2 --- /dev/null +++ b/sechs-sieben.py @@ -0,0 +1,42 @@ +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, run_task, multitask + +hub = PrimeHub() + +# Initialize both motors. In this example, the motor on the +# left must turn counterclockwise to make the robot go forward. +left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) +right_motor = Motor(Port.B) + +arm_motor = Motor(Port.D, Direction.CLOCKWISE) +arm_motor_left= Motor(Port.C, Direction.CLOCKWISE) +# Initialize the drive base. In this example, the wheel diameter is 56mm. +# The distance between the two wheel-ground contact points is 112mm. +drive_base = DriveBase(left_motor, right_motor, wheel_diameter=68.8, axle_track=180) + +print('The default settings are: ' + str(drive_base.settings())) +drive_base.settings(300,1000,300,750) +# Optionally, uncomment the line below to use the gyro for improved accuracy. +drive_base.use_gyro(True) + +async def main(): + await drive_base.straight(519) + await arm_motor_left.run_angle(-10000, 300) + await arm_motor_left.run_angle(10000, 600) + await drive_base.straight(160) + await drive_base.turn(-30) + await drive_base.straight(50) + await arm_motor.run_angle(3000, 3000) + await drive_base.straight(-150) + await drive_base.turn(135) + await drive_base.straight(50) + await arm_motor.run_angle(10000, -3000) + await drive_base.straight(-100) + await drive_base.turn(-54) + await arm_motor.run_angle(10000, -3000) + await drive_base.straight(200) + await arm_motor.run_angle(10000, 10000) +run_task(main()) \ No newline at end of file -- 2.49.1 From 79baeca507637ce33e781aee1b861a30d2b4cf37 Mon Sep 17 00:00:00 2001 From: Rishikesh Lolapu <31lolapr@elmbrookstudents.org> Date: Sat, 18 Oct 2025 14:52:58 +0000 Subject: [PATCH 23/70] Update RoshoDaGoat --- sechs-sieben.py => RoshoDaGoat | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sechs-sieben.py => RoshoDaGoat (100%) diff --git a/sechs-sieben.py b/RoshoDaGoat similarity index 100% rename from sechs-sieben.py rename to RoshoDaGoat -- 2.49.1 From 9eada9f1519d77cb2bad2278784195b755f6669e Mon Sep 17 00:00:00 2001 From: Rishikesh Lolapu <31lolapr@elmbrookstudents.org> Date: Sat, 18 Oct 2025 14:53:08 +0000 Subject: [PATCH 24/70] Update RoshoDaGoat.py --- RoshoDaGoat => RoshoDaGoat.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename RoshoDaGoat => RoshoDaGoat.py (100%) diff --git a/RoshoDaGoat b/RoshoDaGoat.py similarity index 100% rename from RoshoDaGoat rename to RoshoDaGoat.py -- 2.49.1 From c6783889b78338f092c7d97f62b8df6dccc04788 Mon Sep 17 00:00:00 2001 From: Rishikesh Lolapu <31lolapr@elmbrookstudents.org> Date: Sun, 19 Oct 2025 01:51:03 +0000 Subject: [PATCH 25/70] Add missions/Set2.py Please add the backward part of the code. --- missions/Set2.py | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 missions/Set2.py diff --git a/missions/Set2.py b/missions/Set2.py new file mode 100644 index 0000000..9298da3 --- /dev/null +++ b/missions/Set2.py @@ -0,0 +1,50 @@ +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, run_task, multitask + +hub = PrimeHub() + +# Initialize both motors. In this example, the motor on the +# left must turn counterclockwise to make the robot go forward. +left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) +right_motor = Motor(Port.B) + +arm_motor = Motor(Port.D, Direction.CLOCKWISE) +arm_motor_left= Motor(Port.C, Direction.CLOCKWISE) +# Initialize the drive base. In this example, the wheel diameter is 56mm. +# The distance between the two wheel-ground contact points is 112mm. +drive_base = DriveBase(left_motor, right_motor, wheel_diameter=68.8, axle_track=180) + +print('The default settings are: ' + str(drive_base.settings())) +drive_base.settings(300,1000,300,750) +# Optionally, uncomment the line below to use the gyro for improved accuracy. +drive_base.use_gyro(True) + +async def main(): + await drive_base.straight(519) + await arm_motor_left.run_angle(-10000, 300) + await arm_motor_left.run_angle(10000, 600) + await drive_base.straight(160) + await drive_base.turn(-30) + await drive_base.straight(50) + await arm_motor.run_angle(3000, 3000) + await drive_base.straight(-150) + await drive_base.turn(135) + await drive_base.straight(50) + await arm_motor.run_angle(10000, -3000) + await drive_base.straight(-100) + await drive_base.turn(-54) + await arm_motor.run_angle(10000, -3000) + await drive_base.straight(250) + await drive_base.turn(-5) + await arm_motor.run_angle(10000, 7000) + await drive_base.straight(-50) + await drive_base.turn(68) + await arm_motor.run_angle(10000, -6000) + await drive_base.straight(200) + await arm_motor.run_angle(10000, 4000) + await drive_base.turn(-40) + await arm_motor.run_angle(10000, 7000) +run_task(main()) \ No newline at end of file -- 2.49.1 From 53d13476a9a5f8cd5efa95d69ef8c4bc0747e911 Mon Sep 17 00:00:00 2001 From: Parthiv <31vadlap@elmbrookstudents.org> Date: Sun, 19 Oct 2025 03:02:40 +0000 Subject: [PATCH 26/70] Add missions/Heavy lifting.py --- missions/Heavy lifting.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 missions/Heavy lifting.py diff --git a/missions/Heavy lifting.py b/missions/Heavy lifting.py new file mode 100644 index 0000000..643e47d --- /dev/null +++ b/missions/Heavy lifting.py @@ -0,0 +1,37 @@ +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 +from pybricks.tools import run_task, multitask + +hub = PrimeHub() + +left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) +right_motor = Motor(Port.B) + +left_arm = Motor(Port.C, Direction.COUNTERCLOCKWISE) +right_arm = Motor(Port.D) +drive_base = DriveBase(left_motor, right_motor, wheel_diameter=68.8, axle_track=180) +drive_base.settings(600,500,300,200) +drive_base.use_gyro(True) + +async def main(): + await right_arm.run_angle(2000,1000) + + await drive_base.straight(200) + await drive_base.turn(-20) + await drive_base.straight(525) + await drive_base.turn(60) + await drive_base.straight(30) + + await right_arm.run_angle(2000,-1000) + await drive_base.straight(30) + await right_arm.run_angle(3000,1000) + await drive_base.straight(-60) + + await drive_base.turn(-60) + await drive_base.straight(-525) + await drive_base.turn(20) + await drive_base.straight(-200) + -- 2.49.1 From 51d7255cd0e1820a82c06df25b0d004a7617b61b Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Mon, 20 Oct 2025 00:48:18 +0000 Subject: [PATCH 27/70] Add HEAVY_LIFTING_UPD --- HEAVY_LIFTING_UPD | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 HEAVY_LIFTING_UPD diff --git a/HEAVY_LIFTING_UPD b/HEAVY_LIFTING_UPD new file mode 100644 index 0000000..da0f004 --- /dev/null +++ b/HEAVY_LIFTING_UPD @@ -0,0 +1,33 @@ +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 +from pybricks.tools import run_task, multitask + +hub = PrimeHub() + +left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) +right_motor = Motor(Port.B) + +left_arm = Motor(Port.C, Direction.COUNTERCLOCKWISE) +right_arm = Motor(Port.D) +drive_base = DriveBase(left_motor, right_motor, wheel_diameter=68.8, axle_track=180) +drive_base.settings(600,500,300,200) +drive_base.use_gyro(True) + +async def main(): + await drive_base.straight(200) + await drive_base.turn(-20) + await drive_base.straight(536) + await drive_base.turn(60, Stop.HOLD) + await drive_base.straight(30) + + await right_arm.run_angle(5000,3000) + await drive_base.straight(40) + await right_arm.run_angle(5000,-4000) + await drive_base.straight(-60) + + await drive_base.turn(-60) + await drive_base.straight(-670) +run_task(main()) \ No newline at end of file -- 2.49.1 From 9c2b3a2ad9eca9f84d5190c4bc8db75bd6970a3c Mon Sep 17 00:00:00 2001 From: Atharv <30nagava@elmbrookstudents.org> Date: Mon, 20 Oct 2025 15:35:14 +0000 Subject: [PATCH 28/70] Upload files to "/" --- Johannes-dev-dev.zip | Bin 0 -> 23564 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Johannes-dev-dev.zip diff --git a/Johannes-dev-dev.zip b/Johannes-dev-dev.zip new file mode 100644 index 0000000000000000000000000000000000000000..65a47f0b8bf443b7c843d0312fa1e5196ce7eb55 GIT binary patch literal 23564 zcmeFYV{~QVwk;Z~V%xTD+qRPx+o;&KZQHh0vCT>_9d(M7m?{oJ1|5|&qwKdoJ zGiGbw?4yr9zHjuUC<6)x1N6TyXb4rE|MTNNZg4=*KvwpaMs{{)&UB_`ZVYOw;6T8O zp^uh|{}BWAe`0()jE|rofPezwfPgUmHHO{--~zC)vv)H4NA!$_jQtinV(+B}qC-II zs5Hn%sU%9iATm!)5GmVTC+bLGAthZ8>O|tN+7yFbdr3eItDQX8Lp?KBHb&Skug~aY z<41~~f}@3;<7lqDQtBYQJYc;sQww7`pTG2RWGby1ln-^YCJPLMr(=6%#PhgRAjI~Y zdbZC|g^U%U;Af?U?2b4fu#x;Hl_s%%Ibx61C=|6SH~mw$Mkzz(dWgAdXHAqkesODU zvM)h>5Nhv}W%Dr|REF-cfHvFt{k?+getR5Y2(9B@FMTWz72AT_*3U3{ZZFAcU0GGekjdCi7}90LNDeHsMCbq*j~AMweo9pJy&DkI39Mie=5v$%Y=k*(up))@tH2FoId42|8>-*HIJUMt*Wl@A1KmA)BG*M46d z>5_Df9H_gWp1;pfQ+kd2A!_iW#g~FP`Qu%-nYKA9W(z zrGQN;=P7NPQK8KAE$~9I@-~(ul>Xes%-ZWxa)wJ{r`@S^O#Nt7@HzcWN*wFw{^~5* zrV!T#cXUq43U@Y&r2ACE4qLM^2{<(BAxE0(b5#Sg)h*JQfc)`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|X;NP~sZkJUXo;_E74+Cr3o58I-ODQRA7QEm1{(WaE zGTG^cH35}*8Qw7HMH6wwHIIp_?->^ou3e%^$nx$sxyuyRWJzN$e4r(AvG}?z5uiv}lY^Yl z?tT2ct;fT+*eSp1p_09zf*lHSH}gVw6F2@{RRLytp*WPRH|u@}!34?5;C|-(Ecf^7 z{j1`Q!DC8OJKMHKdbkIJ_T(O)2ivKGi{j|##Ezf87)SdPV9(FPKOd+(2baXb_qVR0 z$8-S2Ms!32_I^9$9MOUf_CUYUPVNK;gaUhvVWG}M04T8I7!U4oJeLE6 z0gql_VIQ~wus;uCU}1kM28Tlb(RKJNXLtdyWAy&tpD9rA#|FmCcLM7e-T!Y99(wxN z2n+t8{u1y1dv*W|I~piJZyy`t(uuH>EPf#S->UJUe~M-23IK2aSD-+}{BO)deHqJ) z6Z{+VH<=j-1&Xp*Xt3}}P@pyoWCEp1Ec3~^lb9zdmOwVp^TV>;!6&khv;Kf!pksyw z>xi8MKHfOPlK*_I4$YmT>+rSGmjsZH)}kklSfI&+jWP0g(%-!vY@q+i69KBSSUi)$ zv4Q@zMhm0^D_B_iMdcId$JeufU|=c_3r1?506r$M2c!a%W?1T7tz)UjrqF;?;7$Zf zjWRfvdg8tWNCvJav1C@`W6A$}b!ntW06N4l9DG&|YL9b}LxD{4yo0ouq@=wA*zvrK f7#JoaW)GHfa1xWW13Q4h5-@40^U`)w=k5LvB(nkI literal 0 HcmV?d00001 -- 2.49.1 From 8bd76e569226ecd00feee56fee8e0ff7da2b295a Mon Sep 17 00:00:00 2001 From: Atharv <30nagava@elmbrookstudents.org> Date: Mon, 20 Oct 2025 15:39:58 +0000 Subject: [PATCH 29/70] afniawemhcfj8ewa hjciuawefn awenfuiearhi nofuahweof e2q --- Johannes-dev-dev.zip | Bin 23564 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Johannes-dev-dev.zip diff --git a/Johannes-dev-dev.zip b/Johannes-dev-dev.zip deleted file mode 100644 index 65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2Ms!32_I^9$9MOUf_CUYUPVNK;gaUhvVWG}M04T8I7!U4oJeLE6 z0gql_VIQ~wus;uCU}1kM28Tlb(RKJNXLtdyWAy&tpD9rA#|FmCcLM7e-T!Y99(wxN z2n+t8{u1y1dv*W|I~piJZyy`t(uuH>EPf#S->UJUe~M-23IK2aSD-+}{BO)deHqJ) z6Z{+VH<=j-1&Xp*Xt3}}P@pyoWCEp1Ec3~^lb9zdmOwVp^TV>;!6&khv;Kf!pksyw z>xi8MKHfOPlK*_I4$YmT>+rSGmjsZH)}kklSfI&+jWP0g(%-!vY@q+i69KBSSUi)$ zv4Q@zMhm0^D_B_iMdcId$JeufU|=c_3r1?506r$M2c!a%W?1T7tz)UjrqF;?;7$Zf zjWRfvdg8tWNCvJav1C@`W6A$}b!ntW06N4l9DG&|YL9b}LxD{4yo0ouq@=wA*zvrK f7#JoaW)GHfa1xWW13Q4h5-@40^U`)w=k5LvB(nkI -- 2.49.1 From b8476d4bfc6525dc6eb1f631b245cd5a5401b1ab Mon Sep 17 00:00:00 2001 From: Atharv <30nagava@elmbrookstudents.org> Date: Mon, 20 Oct 2025 15:43:35 +0000 Subject: [PATCH 30/70] Upload files to "missions" --- missions/Boat_mission.py | 27 +++++++++++++++++++++++++++ missions/HEAVY_LIFTING_UPD.py | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 missions/Boat_mission.py create mode 100644 missions/HEAVY_LIFTING_UPD.py diff --git a/missions/Boat_mission.py b/missions/Boat_mission.py new file mode 100644 index 0000000..6d87949 --- /dev/null +++ b/missions/Boat_mission.py @@ -0,0 +1,27 @@ +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 +from pybricks.tools import run_task,multitask + +hub = PrimeHub() + +left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) +right_motor = Motor(Port.B) +left_arm = Motor(Port.C, Direction.COUNTERCLOCKWISE) +right_arm = Motor(Port.D) + +drive_base = DriveBase(left_motor, right_motor, wheel_diameter=68.8, axle_track=180) + +drive_base.settings(880,850,700,700) + +drive_base.use_gyro(True) + +first_run = True + +async def main(): + await drive_base.straight(750) + await drive_base.straight(-650) + +run_task(main()) \ No newline at end of file diff --git a/missions/HEAVY_LIFTING_UPD.py b/missions/HEAVY_LIFTING_UPD.py new file mode 100644 index 0000000..da0f004 --- /dev/null +++ b/missions/HEAVY_LIFTING_UPD.py @@ -0,0 +1,33 @@ +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 +from pybricks.tools import run_task, multitask + +hub = PrimeHub() + +left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) +right_motor = Motor(Port.B) + +left_arm = Motor(Port.C, Direction.COUNTERCLOCKWISE) +right_arm = Motor(Port.D) +drive_base = DriveBase(left_motor, right_motor, wheel_diameter=68.8, axle_track=180) +drive_base.settings(600,500,300,200) +drive_base.use_gyro(True) + +async def main(): + await drive_base.straight(200) + await drive_base.turn(-20) + await drive_base.straight(536) + await drive_base.turn(60, Stop.HOLD) + await drive_base.straight(30) + + await right_arm.run_angle(5000,3000) + await drive_base.straight(40) + await right_arm.run_angle(5000,-4000) + await drive_base.straight(-60) + + await drive_base.turn(-60) + await drive_base.straight(-670) +run_task(main()) \ No newline at end of file -- 2.49.1 From ce4435e7eb9740fc39d8520da18219414f29e6ae Mon Sep 17 00:00:00 2001 From: Atharv <30nagava@elmbrookstudents.org> Date: Mon, 20 Oct 2025 15:44:31 +0000 Subject: [PATCH 31/70] Changed line 23 from 420 to 500 johannes did it idk --- missions/Sand Mission.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/missions/Sand Mission.py b/missions/Sand Mission.py index 73e1e16..368ba5c 100644 --- a/missions/Sand Mission.py +++ b/missions/Sand Mission.py @@ -20,10 +20,10 @@ drive_base.use_gyro(True) async def main(): - await drive_base.straight(420) - await right_arm.run_angle(300,-100) + await drive_base.straight(500) + await right_arm.run_angle(300,100) await drive_base.straight(-100) - await right_arm.run_angle(300, 100) + await right_arm.run_angle(300,-100) await drive_base.straight(-350) run_task(main()) \ No newline at end of file -- 2.49.1 From 50dd00cba6cf44de91cc11051f2b0ebbcb1e3077 Mon Sep 17 00:00:00 2001 From: Atharv <30nagava@elmbrookstudents.org> Date: Mon, 20 Oct 2025 15:48:22 +0000 Subject: [PATCH 32/70] Changed Johannes values Old code was: 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 from pybricks.tools import run_task, multitask hub = PrimeHub() left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) right_motor = Motor(Port.B) left_arm = Motor(Port.C, Direction.COUNTERCLOCKWISE) right_arm = Motor(Port.D) drive_base = DriveBase(left_motor, right_motor, wheel_diameter=68.8, axle_track=180) drive_base.settings(600,500,300,200) drive_base.use_gyro(True) async def main(): await drive_base.straight(915) await drive_base.turn(-90) await drive_base.straight(60) await left_arm.run_angle(10000,-15000) await drive_base.straight(-60) await drive_base.turn(85) await drive_base.straight(2000) run_task(main()) --- missions/Send_Over.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/missions/Send_Over.py b/missions/Send_Over.py index 97bed5f..61e2d37 100644 --- a/missions/Send_Over.py +++ b/missions/Send_Over.py @@ -23,9 +23,9 @@ async def main(): await drive_base.straight(915) await drive_base.turn(-90) await drive_base.straight(60) - await left_arm.run_angle(10000,-15000) - await drive_base.straight(-60) - await drive_base.turn(85) + await left_arm.run_angle(10000,-4000) + await drive_base.straight(-90) + await drive_base.turn(80) await drive_base.straight(2000) - + run_task(main()) \ No newline at end of file -- 2.49.1 From b263687c3b3faeb1080fe8d9de09b6f68df1ee76 Mon Sep 17 00:00:00 2001 From: Atharv <30nagava@elmbrookstudents.org> Date: Mon, 20 Oct 2025 16:13:13 +0000 Subject: [PATCH 33/70] dis id vewwy impotent codes AAAGGGHHHHHHHHHHHHH COLOR SENSORS CAUSE ME PAIN!!!!!!!!!!! --- test_10_17_2025.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test_10_17_2025.py b/test_10_17_2025.py index a9994ae..d36725d 100644 --- a/test_10_17_2025.py +++ b/test_10_17_2025.py @@ -1,3 +1,5 @@ +# Stuff from 10/15/2025 +# Atharv trying with no avail to add more colors to the color sensor logic 😭😭😭😭😭😭😭 from pybricks.hubs import PrimeHub from pybricks.pupdevices import Motor, ColorSensor from pybricks.parameters import Port, Stop, Color, Direction -- 2.49.1 From 97963488eb4bc11b25cfa290295ff537b00bcef2 Mon Sep 17 00:00:00 2001 From: Rishikesh Lolapu <31lolapr@elmbrookstudents.org> Date: Tue, 21 Oct 2025 00:21:53 +0000 Subject: [PATCH 34/70] Update test_10_17_2025.py Rishi, A.K.A me replaced my outdated code with the new one. --- test_10_17_2025.py | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/test_10_17_2025.py b/test_10_17_2025.py index d36725d..1d89281 100644 --- a/test_10_17_2025.py +++ b/test_10_17_2025.py @@ -207,29 +207,30 @@ async def Run3(): async def Run4(): await drive_base.straight(519) - await left_arm.run_angle(300, -200) - await left_arm.run_angle(800, 1000) - await drive_base.straight(180) - await drive_base.turn(-37) - await right_arm.run_angle(300, -50) + await drive_base.straight(519) + await arm_motor_left.run_angle(-10000, 300) + await arm_motor_left.run_angle(10000, 600) + await drive_base.straight(160) + await drive_base.turn(-30) await drive_base.straight(50) - await right_arm.run_angle(300, -350) + await arm_motor.run_angle(3000, 3000) await drive_base.straight(-150) - await drive_base.turn(125) + await drive_base.turn(135) await drive_base.straight(50) - await right_arm.run_angle(300, 400) - await drive_base.straight(-75) - await right_arm.run_angle(300, -200) + await arm_motor.run_angle(10000, -3000) + await drive_base.straight(-100) + await drive_base.turn(-54) + await arm_motor.run_angle(10000, -3000) + await drive_base.straight(250) + await drive_base.turn(-5) + await arm_motor.run_angle(10000, 7000) + await drive_base.straight(-50) + await drive_base.turn(68) + await arm_motor.run_angle(10000, -6000) + await drive_base.straight(200) + await arm_motor.run_angle(10000, 4000) await drive_base.turn(-40) - await right_arm.run_angle(300, 250) - await drive_base.straight(260) - await right_arm.run_angle(100, -300) - await drive_base.straight(30) - await right_arm.run_angle(50,-250) - await drive_base.turn(30) - await drive_base.straight(-200) - await drive_base.turn(-67) - await drive_base.straight(-800) + await arm_motor.run_angle(10000, 7000) async def Run5(): await drive_base.straight(420) -- 2.49.1 From 59213ae3f6d7fede36b6131ea866935d835ef68c Mon Sep 17 00:00:00 2001 From: Rishikesh Lolapu <31lolapr@elmbrookstudents.org> Date: Tue, 21 Oct 2025 00:24:33 +0000 Subject: [PATCH 35/70] Update final/main5.py Just adjusted my code!! --- final/main5.py | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/final/main5.py b/final/main5.py index 2b0fcd6..7461d72 100644 --- a/final/main5.py +++ b/final/main5.py @@ -203,27 +203,29 @@ async def Run3(): async def Run4(): await drive_base.straight(519) - await left_arm.run_angle(300, -100) - await left_arm.run_angle(300, 500) - await drive_base.straight(180) - await drive_base.turn(-37) + await arm_motor_left.run_angle(-10000, 300) + await arm_motor_left.run_angle(10000, 600) + await drive_base.straight(160) + await drive_base.turn(-30) await drive_base.straight(50) - await right_arm.run_angle(300, -400) + await arm_motor.run_angle(3000, 3000) await drive_base.straight(-150) - await drive_base.turn(125) + await drive_base.turn(135) await drive_base.straight(50) - await right_arm.run_angle(300, 400) - await drive_base.straight(-75) - await right_arm.run_angle(300, 300) - await drive_base.turn(-40) + await arm_motor.run_angle(10000, -3000) + await drive_base.straight(-100) + await drive_base.turn(-54) + await arm_motor.run_angle(10000, -3000) await drive_base.straight(250) - await right_arm.run_angle(100, -300) - await drive_base.straight(30) - await right_arm.run_angle(50,-250) - await drive_base.turn(30) - await drive_base.straight(-200) - await drive_base.turn(-50) - await drive_base.straight(-800) + await drive_base.turn(-5) + await arm_motor.run_angle(10000, 7000) + await drive_base.straight(-50) + await drive_base.turn(68) + await arm_motor.run_angle(10000, -6000) + await drive_base.straight(200) + await arm_motor.run_angle(10000, 4000) + await drive_base.turn(-40) + await arm_motor.run_angle(10000, 7000) async def Run5(): await drive_base.straight(420) -- 2.49.1 From cb79ecbb956600d7294b4a106baaa6fb5e0b15f2 Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Tue, 21 Oct 2025 23:54:55 +0000 Subject: [PATCH 36/70] Add missions/Heavy_lifting_final.py --- missions/Heavy_lifting_final.py | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 missions/Heavy_lifting_final.py diff --git a/missions/Heavy_lifting_final.py b/missions/Heavy_lifting_final.py new file mode 100644 index 0000000..95c8889 --- /dev/null +++ b/missions/Heavy_lifting_final.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 +from pybricks.tools import run_task, multitask + +hub = PrimeHub() + +left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) +right_motor = Motor(Port.B) + +left_arm = Motor(Port.C, Direction.COUNTERCLOCKWISE) +right_arm = Motor(Port.D) +drive_base = DriveBase(left_motor, right_motor, wheel_diameter=68.8, axle_track=180) +drive_base.settings(600,500,300,200) +drive_base.use_gyro(True) + +async def main(): + await drive_base.straight(200) + await drive_base.turn(-20) + await drive_base.straight(525) + await drive_base.turn(60) + + await drive_base.straight(50) + await right_arm.run_angle(2000,1000) + await drive_base.straight(-50) + await drive_base.turn(45) + await drive_base.straight(50) + await right_arm.run_angle(350,-1000) + + await drive_base.straight(-100) + await drive_base.turn(-100) + await drive_base.straight(-600) +run_task(main()) \ No newline at end of file -- 2.49.1 From 2567e8b8d75ac4725ec1c20cb1e42a07ca9a680c Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Tue, 21 Oct 2025 23:57:13 +0000 Subject: [PATCH 37/70] Add missions/Send_Over_Final.py --- missions/Send_Over_Final.py | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 missions/Send_Over_Final.py diff --git a/missions/Send_Over_Final.py b/missions/Send_Over_Final.py new file mode 100644 index 0000000..7296ef4 --- /dev/null +++ b/missions/Send_Over_Final.py @@ -0,0 +1,43 @@ +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 +from pybricks.tools import run_task, multitask + +hub = PrimeHub() + +left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) +right_motor = Motor(Port.B) + +left_arm = Motor(Port.C, Direction.COUNTERCLOCKWISE) +right_arm = Motor(Port.D) +lazer_ranger = UltrasonicSensor(Port.E) + +drive_base = DriveBase(left_motor, right_motor, wheel_diameter=68.8, axle_track=180) + +drive_base.settings(600,500,300,200) +drive_base.use_gyro(True) + +async def main(): + await drive_base.straight(920) + await drive_base.turn(-90,Stop.HOLD) + await drive_base.straight(65) + drive_base.turn(-10) + await left_arm.run_angle(10000,-4000) + await drive_base.straight(-110) + await drive_base.turn(90) + await drive_base.straight(500) + while True: + distance_mm = await lazer_ranger.distance() + print('distancing...',distance_mm) + + if distance_mm < 300: + drive_base.stop + break + else: + drive_base.straight(300) + print('running...') + await wait(10) + +run_task(main()) \ No newline at end of file -- 2.49.1 From cf1f8a1995903d94325a75cee7777691f20593f6 Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Wed, 22 Oct 2025 00:04:16 +0000 Subject: [PATCH 38/70] Update missions/Send_Over_Final.py --- missions/Send_Over_Final.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/missions/Send_Over_Final.py b/missions/Send_Over_Final.py index 7296ef4..db9a179 100644 --- a/missions/Send_Over_Final.py +++ b/missions/Send_Over_Final.py @@ -20,11 +20,14 @@ drive_base.settings(600,500,300,200) drive_base.use_gyro(True) async def main(): + #Get to mission await drive_base.straight(920) await drive_base.turn(-90,Stop.HOLD) await drive_base.straight(65) + #Solve mission drive_base.turn(-10) await left_arm.run_angle(10000,-4000) + #Get to Red Start await drive_base.straight(-110) await drive_base.turn(90) await drive_base.straight(500) -- 2.49.1 From 6c9efe26f9da87dc9b409715b3dbe2561fa04ce1 Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Wed, 22 Oct 2025 00:05:00 +0000 Subject: [PATCH 39/70] Update missions/Heavy_lifting_final.py --- missions/Heavy_lifting_final.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/missions/Heavy_lifting_final.py b/missions/Heavy_lifting_final.py index 95c8889..5a9dd1d 100644 --- a/missions/Heavy_lifting_final.py +++ b/missions/Heavy_lifting_final.py @@ -17,18 +17,19 @@ drive_base.settings(600,500,300,200) drive_base.use_gyro(True) async def main(): + #Get to mission await drive_base.straight(200) await drive_base.turn(-20) await drive_base.straight(525) await drive_base.turn(60) - + #Solve mission await drive_base.straight(50) await right_arm.run_angle(2000,1000) await drive_base.straight(-50) await drive_base.turn(45) await drive_base.straight(50) await right_arm.run_angle(350,-1000) - + #Return home await drive_base.straight(-100) await drive_base.turn(-100) await drive_base.straight(-600) -- 2.49.1 From 3ec1aafbeb86a08628b692888e33aad29309474a Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Wed, 22 Oct 2025 00:07:04 +0000 Subject: [PATCH 40/70] Update missions/M8_5.py --- missions/M8_5.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/missions/M8_5.py b/missions/M8_5.py index cf05500..77a036b 100644 --- a/missions/M8_5.py +++ b/missions/M8_5.py @@ -19,31 +19,35 @@ drive_base.settings(600,500,300,200) drive_base.use_gyro(True) async def main(): + #Setup for mission left_arm.run_angle(1000, 300) right_arm.run_angle(1000,500) await drive_base.straight(320) - + # Solve "Silo" await right_arm.run_angle(5000,-500, Stop.HOLD) await right_arm.run_angle(5000,500, Stop.HOLD) await right_arm.run_angle(5000,-500, Stop.HOLD) await right_arm.run_angle(5000,500, Stop.HOLD) await right_arm.run_angle(5000,-500, Stop.HOLD) - + #Get to next mission await drive_base.turn(-20) await drive_base.straight(277) await drive_base.turn(20) await drive_base.straight(65) - + #Solve "Who Lived Here?" await drive_base.turn(-30) right_arm.run_angle(70,500) + #Get to next mission await drive_base.turn(45) - await drive_base.straight(-135) + await drive_base.straight(-145) await drive_base.turn(-60) await drive_base.straight(90) + #Solve "What's on Sale?" await left_arm.run_angle(1000,-450) await drive_base.straight(-145) await left_arm.run_angle(1000,450) await drive_base.straight(10) + #Return to home await drive_base.turn(35) await drive_base.straight(-600) run_task(main()) \ No newline at end of file -- 2.49.1 From 4496396d0be5bea35ac860b21c75a011e4f66b1f Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Wed, 22 Oct 2025 00:15:11 +0000 Subject: [PATCH 41/70] Update missions/M8_5.py --- missions/M8_5.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/missions/M8_5.py b/missions/M8_5.py index 77a036b..95ecc9e 100644 --- a/missions/M8_5.py +++ b/missions/M8_5.py @@ -19,35 +19,31 @@ drive_base.settings(600,500,300,200) drive_base.use_gyro(True) async def main(): - #Setup for mission left_arm.run_angle(1000, 300) right_arm.run_angle(1000,500) await drive_base.straight(320) - # Solve "Silo" + await right_arm.run_angle(5000,-500, Stop.HOLD) await right_arm.run_angle(5000,500, Stop.HOLD) await right_arm.run_angle(5000,-500, Stop.HOLD) await right_arm.run_angle(5000,500, Stop.HOLD) await right_arm.run_angle(5000,-500, Stop.HOLD) - #Get to next mission + await drive_base.turn(-20) await drive_base.straight(277) await drive_base.turn(20) await drive_base.straight(65) - #Solve "Who Lived Here?" + await drive_base.turn(-30) - right_arm.run_angle(70,500) - #Get to next mission + right_arm.run_angle(50,500) await drive_base.turn(45) await drive_base.straight(-145) await drive_base.turn(-60) await drive_base.straight(90) - #Solve "What's on Sale?" await left_arm.run_angle(1000,-450) await drive_base.straight(-145) await left_arm.run_angle(1000,450) await drive_base.straight(10) - #Return to home await drive_base.turn(35) await drive_base.straight(-600) run_task(main()) \ No newline at end of file -- 2.49.1 From d8f1d47882bef7116a7b040bc65884726964125b Mon Sep 17 00:00:00 2001 From: nifrali Date: Wed, 22 Oct 2025 12:37:05 -0500 Subject: [PATCH 42/70] Organize mission codes for scrimmage. Fixed some coolor detection issues --- .../hazmat/Heavy_lifting_final.py | 36 ++ codes_for_scrimmage/hazmat/M8_5.py | 49 +++ codes_for_scrimmage/hazmat/Send_Over_Final.py | 46 +++ codes_for_scrimmage/hazmat/hazmat_main.py | 361 ++++++++++++++++++ codes_for_scrimmage/hazmat/tip the scale.py | 42 ++ 5 files changed, 534 insertions(+) create mode 100644 codes_for_scrimmage/hazmat/Heavy_lifting_final.py create mode 100644 codes_for_scrimmage/hazmat/M8_5.py create mode 100644 codes_for_scrimmage/hazmat/Send_Over_Final.py create mode 100644 codes_for_scrimmage/hazmat/hazmat_main.py create mode 100644 codes_for_scrimmage/hazmat/tip the scale.py diff --git a/codes_for_scrimmage/hazmat/Heavy_lifting_final.py b/codes_for_scrimmage/hazmat/Heavy_lifting_final.py new file mode 100644 index 0000000..5a9dd1d --- /dev/null +++ b/codes_for_scrimmage/hazmat/Heavy_lifting_final.py @@ -0,0 +1,36 @@ +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 +from pybricks.tools import run_task, multitask + +hub = PrimeHub() + +left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) +right_motor = Motor(Port.B) + +left_arm = Motor(Port.C, Direction.COUNTERCLOCKWISE) +right_arm = Motor(Port.D) +drive_base = DriveBase(left_motor, right_motor, wheel_diameter=68.8, axle_track=180) +drive_base.settings(600,500,300,200) +drive_base.use_gyro(True) + +async def main(): + #Get to mission + await drive_base.straight(200) + await drive_base.turn(-20) + await drive_base.straight(525) + await drive_base.turn(60) + #Solve mission + await drive_base.straight(50) + await right_arm.run_angle(2000,1000) + await drive_base.straight(-50) + await drive_base.turn(45) + await drive_base.straight(50) + await right_arm.run_angle(350,-1000) + #Return home + await drive_base.straight(-100) + await drive_base.turn(-100) + await drive_base.straight(-600) +run_task(main()) \ No newline at end of file diff --git a/codes_for_scrimmage/hazmat/M8_5.py b/codes_for_scrimmage/hazmat/M8_5.py new file mode 100644 index 0000000..95ecc9e --- /dev/null +++ b/codes_for_scrimmage/hazmat/M8_5.py @@ -0,0 +1,49 @@ +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 +from pybricks.tools import run_task, multitask + +hub = PrimeHub() + +left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) +right_motor = Motor(Port.B) + +left_arm = Motor(Port.C, Direction.COUNTERCLOCKWISE) +right_arm = Motor(Port.D) + +drive_base = DriveBase(left_motor, right_motor, wheel_diameter=68.8, axle_track=180) + +drive_base.settings(600,500,300,200) +drive_base.use_gyro(True) + +async def main(): + left_arm.run_angle(1000, 300) + right_arm.run_angle(1000,500) + await drive_base.straight(320) + + await right_arm.run_angle(5000,-500, Stop.HOLD) + await right_arm.run_angle(5000,500, Stop.HOLD) + await right_arm.run_angle(5000,-500, Stop.HOLD) + await right_arm.run_angle(5000,500, Stop.HOLD) + await right_arm.run_angle(5000,-500, Stop.HOLD) + + await drive_base.turn(-20) + await drive_base.straight(277) + await drive_base.turn(20) + await drive_base.straight(65) + + await drive_base.turn(-30) + right_arm.run_angle(50,500) + await drive_base.turn(45) + await drive_base.straight(-145) + await drive_base.turn(-60) + await drive_base.straight(90) + await left_arm.run_angle(1000,-450) + await drive_base.straight(-145) + await left_arm.run_angle(1000,450) + await drive_base.straight(10) + await drive_base.turn(35) + await drive_base.straight(-600) +run_task(main()) \ No newline at end of file diff --git a/codes_for_scrimmage/hazmat/Send_Over_Final.py b/codes_for_scrimmage/hazmat/Send_Over_Final.py new file mode 100644 index 0000000..db9a179 --- /dev/null +++ b/codes_for_scrimmage/hazmat/Send_Over_Final.py @@ -0,0 +1,46 @@ +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 +from pybricks.tools import run_task, multitask + +hub = PrimeHub() + +left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) +right_motor = Motor(Port.B) + +left_arm = Motor(Port.C, Direction.COUNTERCLOCKWISE) +right_arm = Motor(Port.D) +lazer_ranger = UltrasonicSensor(Port.E) + +drive_base = DriveBase(left_motor, right_motor, wheel_diameter=68.8, axle_track=180) + +drive_base.settings(600,500,300,200) +drive_base.use_gyro(True) + +async def main(): + #Get to mission + await drive_base.straight(920) + await drive_base.turn(-90,Stop.HOLD) + await drive_base.straight(65) + #Solve mission + drive_base.turn(-10) + await left_arm.run_angle(10000,-4000) + #Get to Red Start + await drive_base.straight(-110) + await drive_base.turn(90) + await drive_base.straight(500) + while True: + distance_mm = await lazer_ranger.distance() + print('distancing...',distance_mm) + + if distance_mm < 300: + drive_base.stop + break + else: + drive_base.straight(300) + print('running...') + await wait(10) + +run_task(main()) \ No newline at end of file diff --git a/codes_for_scrimmage/hazmat/hazmat_main.py b/codes_for_scrimmage/hazmat/hazmat_main.py new file mode 100644 index 0000000..e55bd2e --- /dev/null +++ b/codes_for_scrimmage/hazmat/hazmat_main.py @@ -0,0 +1,361 @@ +from pybricks.pupdevices import Motor, ColorSensor, UltrasonicSensor, ForceSensor +from pybricks.parameters import Button, Color, Direction, Port, Side, Stop +from pybricks.tools import run_task, multitask +from pybricks.tools import wait, StopWatch +from pybricks.robotics import DriveBase +from pybricks.hubs import PrimeHub + +# Initialize hub and devices +hub = PrimeHub() + +left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) +right_motor = Motor(Port.B) + +left_arm = Motor(Port.C) +right_arm = Motor(Port.D) +lazer_ranger = UltrasonicSensor(Port.E) +color_sensor = ColorSensor(Port.F) + +# DriveBase configuration +WHEEL_DIAMETER = 68.8 # mm (adjust for your wheels) +AXLE_TRACK = 180 # mm (distance between wheels) +drive_base = DriveBase(left_motor, right_motor, WHEEL_DIAMETER, AXLE_TRACK) +drive_base.settings(600,500,300,200) +drive_base.use_gyro(True) + +# Color Settings +# https://docs.pybricks.com/en/latest/parameters/color.html +print("Default Detected Colors:", color_sensor.detectable_colors()) + +# Custom color Hue, Saturation, Brightness value for Lego bricks +Color.MAGENTA = Color(300,100,100) +Color.VIOLET = Color(270,100,100) +Color.ORANGE = Color(17,78,15) +Color.BLUE = Color(240,100,100) +Color.CYAN = Color(180,100,100) + +LEGO_BRICKS_COLOR = [ + Color.ORANGE, + Color.BLUE, + Color.GREEN, + Color.WHITE, + Color.RED, + Color.YELLOW, + Color.MAGENTA, + Color.VIOLET, + Color.NONE +] +#Update Detectable colors +color_sensor.detectable_colors(LEGO_BRICKS_COLOR) + +print("Updated Detected Colors:", color_sensor.detectable_colors()) + +hub.speaker.volume(50) # Set the volume of the speaker + +# Celebration sound types +class CelebrationSound: + VICTORY_FANFARE = 0 + LEVEL_UP = 1 + SUCCESS_CHIME = 2 + TA_DA = 3 + POWER_UP = 4 + RICKROLL_INSPIRED = 5 + +async def play_victory_fanfare(): + """Classic victory fanfare""" + notes = [ + (262, 200), # C4 + (262, 200), # C4 + (262, 200), # C4 + (349, 600), # F4 + ] + + for freq, duration in notes: + await hub.speaker.beep(freq, duration) + await wait(50) +async def play_level_up(): + """Upward scale for level completion""" + notesold = [ + (262, 100), # C4 + (294, 100), # D4 + (330, 100), # E4 + (349, 100), # F4 + (392, 100), # G4 + (440, 100), # A4 + (494, 100), # B4 + (523, 300), # C5 + ] + notes = [ + (277, 100), + (330, 100), + (277, 100), + (554, 100), + (277, 100), + (413, 100), + (330, 100), + (277, 100), + (413, 100), + (277, 100), + (554, 100), + (413, 100), + (277, 100), + (413, 100), + (554, 100), + (413, 100) + ] + + for freq, duration in notes: + await hub.speaker.beep(freq, duration) + #await wait(20) +async def play_success_chime(): + """Simple success notification""" + notes = [ + (523, 150), # C5 + (659, 150), # E5 + (784, 300), # G5 + ] + + for freq, duration in notes: + await hub.speaker.beep(freq, duration) + await wait(50) +async def play_ta_da(): + """Classic "ta-da!" sound""" + notes = [ + (392, 200), # G4 + (523, 400), # C5 + ] + + for freq, duration in notes: + await hub.speaker.beep(freq, duration) + await wait(100) +async def play_power_up(): + """Rising power-up sound""" + for freq in range(200, 800, 50): + await hub.speaker.beep(freq, 50) + await wait(10) + await hub.speaker.beep(1000, 200) +async def play_rickroll_inspired(): + """Fun 80s-style dance beat inspired sound""" + # Upbeat bouncy rhythm + pattern = [ + (392, 200), (440, 200), (494, 200), (523, 200), + (440, 200), (392, 200), (349, 200), (392, 300), + (440, 200), (392, 200), (349, 200), (330, 400), + ] + + for freq, duration in pattern: + await hub.speaker.beep(freq, duration) + await wait(50) +async def celebrate_mission_complete(sound_type=CelebrationSound.SUCCESS_CHIME): + """ + Main celebration function to call after completing a mission. + Plays a sound and shows light animation. + + Args: + sound_type: CelebrationSound enum value (default: SUCCESS_CHIME) + """ + # Light show + hub.light.on(Color.GREEN) + + # Play the selected celebration sound + if sound_type == CelebrationSound.VICTORY_FANFARE: + await play_victory_fanfare() + elif sound_type == CelebrationSound.LEVEL_UP: + await play_level_up() + elif sound_type == CelebrationSound.SUCCESS_CHIME: + await play_success_chime() + elif sound_type == CelebrationSound.TA_DA: + await play_ta_da() + elif sound_type == CelebrationSound.POWER_UP: + await play_power_up() + elif sound_type == CelebrationSound.RICKROLL_INSPIRED: + await play_rickroll_inspired() + else: + await play_success_chime() # Default fallback + + # Blink the light + for _ in range(3): + hub.light.off() + await wait(100) + hub.light.on(Color.GREEN) + await wait(100) + + hub.light.off() + +WALL_DISTANCE = 200 # mm +async def drive_forward(): + """Drive forward continuously using DriveBase.""" + #await drive_base.straight(5000) + drive_base.drive(400,0) +async def monitor_distance(): + """Monitor ultrasonic sensor and stop when wall is detected.""" + while True: + distance = await lazer_ranger.distance() + + if distance < WALL_DISTANCE: + # Stop the drivebase + await drive_base.turn(-180) + drive_base.brake + print(f"Wall detected at {distance}mm!") + break + + # Small delay to prevent overwhelming the sensor + await wait(50) + +async def Run1(): #From M8_5.py + left_arm.run_angle(1000, 300) + right_arm.run_angle(1000,500) + await drive_base.straight(320) + + await right_arm.run_angle(5000,-500, Stop.HOLD) + await right_arm.run_angle(5000,500, Stop.HOLD) + await right_arm.run_angle(5000,-500, Stop.HOLD) + await right_arm.run_angle(5000,500, Stop.HOLD) + await right_arm.run_angle(5000,-500, Stop.HOLD) + + await drive_base.turn(-20) + await drive_base.straight(277) + await drive_base.turn(20) + await drive_base.straight(65) + + await drive_base.turn(-30) + right_arm.run_angle(50,500) + await drive_base.turn(45) + await drive_base.straight(-145) + await drive_base.turn(-60) + await drive_base.straight(90) + await left_arm.run_angle(1000,-450) + await drive_base.straight(-145) + await left_arm.run_angle(1000,450) + await drive_base.straight(10) + await drive_base.turn(35) + await drive_base.straight(-600) + +async def Run2(): #From Heavy_lifting_final.py + #Get to mission + await drive_base.straight(200) + await drive_base.turn(-20) + await drive_base.straight(525) + await drive_base.turn(60) + #Solve mission + await drive_base.straight(50) + await right_arm.run_angle(2000,1000) + await drive_base.straight(-50) + await drive_base.turn(45) + await drive_base.straight(50) + await right_arm.run_angle(350,-1000) + #Return home + await drive_base.straight(-100) + await drive_base.turn(-100) + await drive_base.straight(-600) + + +async def Run3(): #tip the scale.py + drive_base.settings(300,1000,300,200) #Custom drive_base setting based on Ayaan's code + + left_arm.run_angle(500,200) + right_arm.run_angle(500,200) + await drive_base.straight(70) + + await drive_base.turn(-55) + await drive_base.straight(900) + await drive_base.turn(92.5) + + await drive_base.straight(75) + await drive_base.straight(21) + await right_arm.run_angle(500,-250) + await right_arm.run_angle(500,250) + await drive_base.turn(55) + + await left_arm.run_angle(300,-400) + + await drive_base.turn(46.5) + await drive_base.turn(-40) + await drive_base.straight(900) + + drive_base.settings(600,500,300,200) #Reset it to the initial values + +async def Run4(): #From Send_Over_Final.py + + #Get to mission + await drive_base.straight(920) + await drive_base.turn(-90,Stop.HOLD) + await drive_base.straight(65) + #Solve mission + drive_base.turn(-10) + await left_arm.run_angle(10000,-4000) + #Get to Red Start + await drive_base.straight(-110) + await drive_base.turn(90) + await drive_base.straight(500) + + # while True: + # distance_mm = await lazer_ranger.distance() + # print('distancing...',distance_mm) + + # if distance_mm < 300: + # drive_base.stop + # break + # else: + # drive_base.straight(300) + # print('running...') + # await wait(10) + await multitask( + drive_forward(), + monitor_distance() + ) + +#Add Rishi's code here +async def Run5(): + pass + +#Add - Adi's code here +async def Run6(): + pass + +async def main(): + while True: + + #await celebrate_mission_complete(CelebrationSound.LEVEL_UP) + color_reflected_percent = await color_sensor.reflection() + print(color_reflected_percent) + + + if color_reflected_percent > 5: # Make sure we actually have color reflections before checking for color + color_detected = await color_sensor.color() # Moved this inside the if clause + print(f'Detected color:{color_detected} : {color_detected.h}, {color_detected.s}, {color_detected.v}') + + if color_detected == Color.GREEN: + print('Running Mission 1') + await Run1() + #await celebrate_mission_complete(CelebrationSound.VICTORY_FANFARE) + elif color_detected == Color.WHITE: + print('Running Mission 2') + await Run2() + #await celebrate_mission_complete(CelebrationSound.RICKROLL_INSPIRED) + elif color_detected == Color.RED: + print('Running Mission 3') + await Run3() + #await celebrate_mission_complete(CelebrationSound.SUCCESS_CHIME ) + elif color_detected == Color.YELLOW: + print('Running Mission 4') + await Run4() + #await celebrate_mission_complete(CelebrationSound.POWER_UP) + elif color_detected == Color.BLUE: + print('Running Mission 5') + await Run5() + #await celebrate_mission_complete(CelebrationSound.LEVEL_UP) + elif color_detected == Color.ORANGE: + print('Running Mission 6') + await Run6() + else: + hub.light.off() + left_motor.stop() + right_motor.stop() + color_detected = Color.NONE + else: + color_detected = Color.NONE + + await wait(1000) #prevent loop from iterating fast +# Main execution loop +run_task(main()) diff --git a/codes_for_scrimmage/hazmat/tip the scale.py b/codes_for_scrimmage/hazmat/tip the scale.py new file mode 100644 index 0000000..200b1ea --- /dev/null +++ b/codes_for_scrimmage/hazmat/tip the scale.py @@ -0,0 +1,42 @@ +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 +from pybricks.tools import run_task, multitask + +hub = PrimeHub() + +left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) +right_motor = Motor(Port.B) + + +left_arm = Motor(Port.C, Direction.COUNTERCLOCKWISE) +right_arm = Motor(Port.D) + +drive_base = DriveBase(left_motor, right_motor, wheel_diameter=68.8, axle_track=180) +drive_base.settings(300,1000,300,200) + +#drive_base.use_gyro(True) + +async def main(): + left_arm.run_angle(500,200) + right_arm.run_angle(500,200) + await drive_base.straight(70) + + await drive_base.turn(-55) + await drive_base.straight(900) + await drive_base.turn(92.5) + + await drive_base.straight(75) + await drive_base.straight(21) + await right_arm.run_angle(500,-250) + await right_arm.run_angle(500,250) + await drive_base.turn(55) + + await left_arm.run_angle(300,-400) + + await drive_base.turn(46.5) + await drive_base.turn(-40) + await drive_base.straight(900) +run_task(main()) \ No newline at end of file -- 2.49.1 From 1f2a467b9b646e8f21f66fb74d35733d0cf7487a Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Thu, 23 Oct 2025 00:28:52 +0000 Subject: [PATCH 43/70] Update codes_for_scrimmage/hazmat/Heavy_lifting_final.py --- .../hazmat/Heavy_lifting_final.py | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/codes_for_scrimmage/hazmat/Heavy_lifting_final.py b/codes_for_scrimmage/hazmat/Heavy_lifting_final.py index 5a9dd1d..86a67e9 100644 --- a/codes_for_scrimmage/hazmat/Heavy_lifting_final.py +++ b/codes_for_scrimmage/hazmat/Heavy_lifting_final.py @@ -17,20 +17,17 @@ drive_base.settings(600,500,300,200) drive_base.use_gyro(True) async def main(): - #Get to mission - await drive_base.straight(200) + #await drive_base.straight(200) await drive_base.turn(-20) - await drive_base.straight(525) - await drive_base.turn(60) - #Solve mission - await drive_base.straight(50) - await right_arm.run_angle(2000,1000) - await drive_base.straight(-50) - await drive_base.turn(45) - await drive_base.straight(50) - await right_arm.run_angle(350,-1000) - #Return home - await drive_base.straight(-100) - await drive_base.turn(-100) - await drive_base.straight(-600) + await drive_base.straight(536) + await drive_base.turn(60, Stop.HOLD) + await drive_base.straight(30) + + await right_arm.run_angle(5000,2900) + await drive_base.straight(40) + await right_arm.run_angle(5000,-4000) + await drive_base.straight(-60) + + await drive_base.turn(-60) + await drive_base.straight(-670) run_task(main()) \ No newline at end of file -- 2.49.1 From 68aff887da32f3ec2c6aed3a3495fd394e928910 Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Thu, 23 Oct 2025 00:29:22 +0000 Subject: [PATCH 44/70] Update codes_for_scrimmage/hazmat/hazmat_main.py --- codes_for_scrimmage/hazmat/hazmat_main.py | 25 ++++++++++------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/codes_for_scrimmage/hazmat/hazmat_main.py b/codes_for_scrimmage/hazmat/hazmat_main.py index e55bd2e..f40fe31 100644 --- a/codes_for_scrimmage/hazmat/hazmat_main.py +++ b/codes_for_scrimmage/hazmat/hazmat_main.py @@ -232,22 +232,19 @@ async def Run1(): #From M8_5.py await drive_base.straight(-600) async def Run2(): #From Heavy_lifting_final.py - #Get to mission await drive_base.straight(200) await drive_base.turn(-20) - await drive_base.straight(525) - await drive_base.turn(60) - #Solve mission - await drive_base.straight(50) - await right_arm.run_angle(2000,1000) - await drive_base.straight(-50) - await drive_base.turn(45) - await drive_base.straight(50) - await right_arm.run_angle(350,-1000) - #Return home - await drive_base.straight(-100) - await drive_base.turn(-100) - await drive_base.straight(-600) + await drive_base.straight(536) + await drive_base.turn(60, Stop.HOLD) + await drive_base.straight(30) + + await right_arm.run_angle(5000,2900) + await drive_base.straight(40) + await right_arm.run_angle(5000,-4000) + await drive_base.straight(-60) + + await drive_base.turn(-60) + await drive_base.straight(-670) async def Run3(): #tip the scale.py -- 2.49.1 From 11acca07449ebffd84106ea66ed6d53988d89d4b Mon Sep 17 00:00:00 2001 From: Atharv <30nagava@elmbrookstudents.org> Date: Thu, 23 Oct 2025 00:33:01 +0000 Subject: [PATCH 45/70] Add codes_for_scrimmage/hazmat/hazmat_main.py --- codes_for_scrimmage/hazmat/hazmat_main.py | 356 ++++++++++++++++++++++ 1 file changed, 356 insertions(+) create mode 100644 codes_for_scrimmage/hazmat/hazmat_main.py diff --git a/codes_for_scrimmage/hazmat/hazmat_main.py b/codes_for_scrimmage/hazmat/hazmat_main.py new file mode 100644 index 0000000..f62eb01 --- /dev/null +++ b/codes_for_scrimmage/hazmat/hazmat_main.py @@ -0,0 +1,356 @@ +from pybricks.pupdevices import Motor, ColorSensor, UltrasonicSensor, ForceSensor +from pybricks.parameters import Button, Color, Direction, Port, Side, Stop +from pybricks.tools import run_task, multitask +from pybricks.tools import wait, StopWatch +from pybricks.robotics import DriveBase +from pybricks.hubs import PrimeHub + +# Initialize hub and devices +hub = PrimeHub() + +left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) +right_motor = Motor(Port.B) + +left_arm = Motor(Port.C) +right_arm = Motor(Port.D) +lazer_ranger = UltrasonicSensor(Port.E) +color_sensor = ColorSensor(Port.F) + +# DriveBase configuration +WHEEL_DIAMETER = 68.8 # mm (adjust for your wheels) +AXLE_TRACK = 180 # mm (distance between wheels) +drive_base = DriveBase(left_motor, right_motor, WHEEL_DIAMETER, AXLE_TRACK) +drive_base.settings(600,500,300,200) +drive_base.use_gyro(True) + +# Color Settings +# https://docs.pybricks.com/en/latest/parameters/color.html +print("Default Detected Colors:", color_sensor.detectable_colors()) + +# Custom color Hue, Saturation, Brightness value for Lego bricks +Color.MAGENTA = Color(300,100,100) +Color.VIOLET = Color(277,68,32) +Color.BLUE = Color(240,100,100) +Color.CYAN = Color(180,100,100) + +LEGO_BRICKS_COLOR = [ + Color.BLUE, + Color.GREEN, + Color.WHITE, + Color.RED, + Color.YELLOW, + Color.MAGENTA, + Color.VIOLET, + Color.NONE +] +#Update Detectable colors +color_sensor.detectable_colors(LEGO_BRICKS_COLOR) + +print("Updated Detected Colors:", color_sensor.detectable_colors()) + +hub.speaker.volume(50) # Set the volume of the speaker + +# Celebration sound types +class CelebrationSound: + VICTORY_FANFARE = 0 + LEVEL_UP = 1 + SUCCESS_CHIME = 2 + TA_DA = 3 + POWER_UP = 4 + RICKROLL_INSPIRED = 5 + +async def play_victory_fanfare(): + """Classic victory fanfare""" + notes = [ + (262, 200), # C4 + (262, 200), # C4 + (262, 200), # C4 + (349, 600), # F4 + ] + + for freq, duration in notes: + await hub.speaker.beep(freq, duration) + await wait(50) +async def play_level_up(): + """Upward scale for level completion""" + notesold = [ + (262, 100), # C4 + (294, 100), # D4 + (330, 100), # E4 + (349, 100), # F4 + (392, 100), # G4 + (440, 100), # A4 + (494, 100), # B4 + (523, 300), # C5 + ] + notes = [ + (277, 100), + (330, 100), + (277, 100), + (554, 100), + (277, 100), + (413, 100), + (330, 100), + (277, 100), + (413, 100), + (277, 100), + (554, 100), + (413, 100), + (277, 100), + (413, 100), + (554, 100), + (413, 100) + ] + + for freq, duration in notes: + await hub.speaker.beep(freq, duration) + #await wait(20) +async def play_success_chime(): + """Simple success notification""" + notes = [ + (523, 150), # C5 + (659, 150), # E5 + (784, 300), # G5 + ] + + for freq, duration in notes: + await hub.speaker.beep(freq, duration) + await wait(50) +async def play_ta_da(): + """Classic "ta-da!" sound""" + notes = [ + (392, 200), # G4 + (523, 400), # C5 + ] + + for freq, duration in notes: + await hub.speaker.beep(freq, duration) + await wait(100) +async def play_power_up(): + """Rising power-up sound""" + for freq in range(200, 800, 50): + await hub.speaker.beep(freq, 50) + await wait(10) + await hub.speaker.beep(1000, 200) +async def play_rickroll_inspired(): + """Fun 80s-style dance beat inspired sound""" + # Upbeat bouncy rhythm + pattern = [ + (392, 200), (440, 200), (494, 200), (523, 200), + (440, 200), (392, 200), (349, 200), (392, 300), + (440, 200), (392, 200), (349, 200), (330, 400), + ] + + for freq, duration in pattern: + await hub.speaker.beep(freq, duration) + await wait(50) +async def celebrate_mission_complete(sound_type=CelebrationSound.SUCCESS_CHIME): + """ + Main celebration function to call after completing a mission. + Plays a sound and shows light animation. + + Args: + sound_type: CelebrationSound enum value (default: SUCCESS_CHIME) + """ + # Light show + hub.light.on(Color.GREEN) + + # Play the selected celebration sound + if sound_type == CelebrationSound.VICTORY_FANFARE: + await play_victory_fanfare() + elif sound_type == CelebrationSound.LEVEL_UP: + await play_level_up() + elif sound_type == CelebrationSound.SUCCESS_CHIME: + await play_success_chime() + elif sound_type == CelebrationSound.TA_DA: + await play_ta_da() + elif sound_type == CelebrationSound.POWER_UP: + await play_power_up() + elif sound_type == CelebrationSound.RICKROLL_INSPIRED: + await play_rickroll_inspired() + else: + await play_success_chime() # Default fallback + + # Blink the light + for _ in range(3): + hub.light.off() + await wait(100) + hub.light.on(Color.GREEN) + await wait(100) + + hub.light.off() + +WALL_DISTANCE = 200 # mm +async def drive_forward(): + """Drive forward continuously using DriveBase.""" + #await drive_base.straight(5000) + drive_base.drive(400,0) +async def monitor_distance(): + """Monitor ultrasonic sensor and stop when wall is detected.""" + while True: + distance = await lazer_ranger.distance() + + if distance < WALL_DISTANCE: + # Stop the drivebase + await drive_base.turn(-180) + drive_base.brake + print(f"Wall detected at {distance}mm!") + break + + # Small delay to prevent overwhelming the sensor + await wait(50) + +async def Run1(): #From M8_5.py + left_arm.run_angle(1000, 300) + right_arm.run_angle(1000,500) + await drive_base.straight(320) + + await right_arm.run_angle(5000,-500, Stop.HOLD) + await right_arm.run_angle(5000,500, Stop.HOLD) + await right_arm.run_angle(5000,-500, Stop.HOLD) + await right_arm.run_angle(5000,500, Stop.HOLD) + await right_arm.run_angle(5000,-500, Stop.HOLD) + + await drive_base.turn(-20) + await drive_base.straight(277) + await drive_base.turn(20) + await drive_base.straight(65) + + await drive_base.turn(-30) + right_arm.run_angle(50,500) + await drive_base.turn(45) + await drive_base.straight(-145) + await drive_base.turn(-60) + await drive_base.straight(90) + await left_arm.run_angle(1000,-450) + await drive_base.straight(-145) + await left_arm.run_angle(1000,450) + await drive_base.straight(10) + await drive_base.turn(35) + await drive_base.straight(-600) + +async def Run2(): #From Heavy_lifting_final.py + await drive_base.straight(200) + await drive_base.turn(-20) + await drive_base.straight(536) + await drive_base.turn(60, Stop.HOLD) + await drive_base.straight(30) + + await right_arm.run_angle(5000,2900) + await drive_base.straight(40) + await right_arm.run_angle(5000,-4000) + await drive_base.straight(-60) + + await drive_base.turn(-60) + await drive_base.straight(-670) + + +async def Run3(): #tip the scale.py + drive_base.settings(300,1000,300,200) #Custom drive_base setting based on Ayaan's code + + left_arm.run_angle(500,200) + right_arm.run_angle(500,200) + await drive_base.straight(70) + + await drive_base.turn(-55) + await drive_base.straight(900) + await drive_base.turn(92.5) + + await drive_base.straight(75) + await drive_base.straight(21) + await right_arm.run_angle(500,-250) + await right_arm.run_angle(500,250) + await drive_base.turn(55) + + await left_arm.run_angle(300,-400) + + await drive_base.turn(46.5) + await drive_base.turn(-40) + await drive_base.straight(900) + + drive_base.settings(600,500,300,200) #Reset it to the initial values + +async def Run4(): #From Send_Over_Final.py + + #Get to mission + await drive_base.straight(920) + await drive_base.turn(-90,Stop.HOLD) + await drive_base.straight(65) + #Solve mission + drive_base.turn(-10) + await left_arm.run_angle(10000,-4000) + #Get to Red Start + await drive_base.straight(-110) + await drive_base.turn(90) + await drive_base.straight(500) + + # while True: + # distance_mm = await lazer_ranger.distance() + # print('distancing...',distance_mm) + + # if distance_mm < 300: + # drive_base.stop + # break + # else: + # drive_base.straight(300) + # print('running...') + # await wait(10) + await multitask( + drive_forward(), + monitor_distance() + ) + +#Add Rishi's code here +async def Run5(): + pass + +#Add - Adi's code here +async def Run6(): + pass + +async def main(): + while True: + + #await celebrate_mission_complete(CelebrationSound.LEVEL_UP) + color_reflected_percent = await color_sensor.reflection() + print(color_reflected_percent) + + + if color_reflected_percent > 1: # Make sure we actually have color reflections before checking for color + color_detected = await color_sensor.color() # Moved this inside the if clause + print(f'Detected color:{color_detected} : {color_detected.h}, {color_detected.s}, {color_detected.v}') + + if color_detected == Color.GREEN: + print('Running Mission 1') + await Run1() + #await celebrate_mission_complete(CelebrationSound.VICTORY_FANFARE) + elif color_detected == Color.WHITE: + print('Running Mission 2') + await Run2() + #await celebrate_mission_complete(CelebrationSound.RICKROLL_INSPIRED) + elif color_detected == Color.RED: + print('Running Mission 3') + await Run3() + #await celebrate_mission_complete(CelebrationSound.SUCCESS_CHIME ) + elif color_detected == Color.YELLOW: + print('Running Mission 4') + await Run4() + #await celebrate_mission_complete(CelebrationSound.POWER_UP) + elif color_detected == Color.BLUE: + print('Running Mission 5') + await Run5() + #await celebrate_mission_complete(CelebrationSound.LEVEL_UP) + elif color_detected == Color.VIOLET: + print('Running Mission 6') + await Run6() + else: + hub.light.off() + left_motor.stop() + right_motor.stop() + color_detected = Color.NONE + else: + color_detected = Color.NONE + + await wait(1000) #prevent loop from iterating fast +# Main execution loop +run_task(main()) -- 2.49.1 From 1cb08a0c32b39004ca6c0b059f17842816e7444f Mon Sep 17 00:00:00 2001 From: Rishikesh Lolapu <31lolapr@elmbrookstudents.org> Date: Thu, 23 Oct 2025 00:34:14 +0000 Subject: [PATCH 46/70] Update codes_for_scrimmage/hazmat/hazmat_main.py Adding Rishi/Vickram + Adi Mission's --- codes_for_scrimmage/hazmat/hazmat_main.py | 57 +++++++++++++++++------ 1 file changed, 44 insertions(+), 13 deletions(-) diff --git a/codes_for_scrimmage/hazmat/hazmat_main.py b/codes_for_scrimmage/hazmat/hazmat_main.py index f40fe31..0bb9103 100644 --- a/codes_for_scrimmage/hazmat/hazmat_main.py +++ b/codes_for_scrimmage/hazmat/hazmat_main.py @@ -232,19 +232,22 @@ async def Run1(): #From M8_5.py await drive_base.straight(-600) async def Run2(): #From Heavy_lifting_final.py + #Get to mission await drive_base.straight(200) await drive_base.turn(-20) - await drive_base.straight(536) - await drive_base.turn(60, Stop.HOLD) - await drive_base.straight(30) - - await right_arm.run_angle(5000,2900) - await drive_base.straight(40) - await right_arm.run_angle(5000,-4000) - await drive_base.straight(-60) - - await drive_base.turn(-60) - await drive_base.straight(-670) + await drive_base.straight(525) + await drive_base.turn(60) + #Solve mission + await drive_base.straight(50) + await right_arm.run_angle(2000,1000) + await drive_base.straight(-50) + await drive_base.turn(45) + await drive_base.straight(50) + await right_arm.run_angle(350,-1000) + #Return home + await drive_base.straight(-100) + await drive_base.turn(-100) + await drive_base.straight(-600) async def Run3(): #tip the scale.py @@ -304,11 +307,39 @@ async def Run4(): #From Send_Over_Final.py #Add Rishi's code here async def Run5(): - pass + await drive_base.straight(519) + await left_arm.run_angle(-10000, 300) + await left_arm.run_angle(10000, 600) + await drive_base.straight(160) + await drive_base.turn(-30) + await drive_base.straight(50) + await right_arm.run_angle(3000, 3000) + await drive_base.straight(-150) + await drive_base.turn(135) + await drive_base.straight(25) + await right_arm.run_angle(10000, -3000) + await drive_base.straight(-100) + await drive_base.turn(-55) + await right_arm.run_angle(10000, -3000) + await drive_base.straight(250) + await drive_base.turn(-5) + await right_arm.run_angle(10000, 7000) + await drive_base.straight(-50) + await drive_base.turn(45) + await drive_base.straight(100) + await drive_base.turn(37) + await right_arm.run_angle(10000, -6000) + await drive_base.straight(90) + await right_arm.run_angle(3000, 3000) + await drive_base.turn(-40) #Add - Adi's code here async def Run6(): - pass + await drive_base.straight(420) + await right_arm.run_angle(300,-100) + await drive_base.straight(-100) + await right_arm.run_angle(300, 100) + await drive_base.straight(-350) async def main(): while True: -- 2.49.1 From 30bc22a457928711f2025aeb090a3d1e9aee8e0d Mon Sep 17 00:00:00 2001 From: Atharv <30nagava@elmbrookstudents.org> Date: Thu, 23 Oct 2025 00:34:40 +0000 Subject: [PATCH 47/70] Delete codes_for_scrimmage/hazmat/hazmat_main.py --- codes_for_scrimmage/hazmat/hazmat_main.py | 356 ---------------------- 1 file changed, 356 deletions(-) delete mode 100644 codes_for_scrimmage/hazmat/hazmat_main.py diff --git a/codes_for_scrimmage/hazmat/hazmat_main.py b/codes_for_scrimmage/hazmat/hazmat_main.py deleted file mode 100644 index f62eb01..0000000 --- a/codes_for_scrimmage/hazmat/hazmat_main.py +++ /dev/null @@ -1,356 +0,0 @@ -from pybricks.pupdevices import Motor, ColorSensor, UltrasonicSensor, ForceSensor -from pybricks.parameters import Button, Color, Direction, Port, Side, Stop -from pybricks.tools import run_task, multitask -from pybricks.tools import wait, StopWatch -from pybricks.robotics import DriveBase -from pybricks.hubs import PrimeHub - -# Initialize hub and devices -hub = PrimeHub() - -left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) -right_motor = Motor(Port.B) - -left_arm = Motor(Port.C) -right_arm = Motor(Port.D) -lazer_ranger = UltrasonicSensor(Port.E) -color_sensor = ColorSensor(Port.F) - -# DriveBase configuration -WHEEL_DIAMETER = 68.8 # mm (adjust for your wheels) -AXLE_TRACK = 180 # mm (distance between wheels) -drive_base = DriveBase(left_motor, right_motor, WHEEL_DIAMETER, AXLE_TRACK) -drive_base.settings(600,500,300,200) -drive_base.use_gyro(True) - -# Color Settings -# https://docs.pybricks.com/en/latest/parameters/color.html -print("Default Detected Colors:", color_sensor.detectable_colors()) - -# Custom color Hue, Saturation, Brightness value for Lego bricks -Color.MAGENTA = Color(300,100,100) -Color.VIOLET = Color(277,68,32) -Color.BLUE = Color(240,100,100) -Color.CYAN = Color(180,100,100) - -LEGO_BRICKS_COLOR = [ - Color.BLUE, - Color.GREEN, - Color.WHITE, - Color.RED, - Color.YELLOW, - Color.MAGENTA, - Color.VIOLET, - Color.NONE -] -#Update Detectable colors -color_sensor.detectable_colors(LEGO_BRICKS_COLOR) - -print("Updated Detected Colors:", color_sensor.detectable_colors()) - -hub.speaker.volume(50) # Set the volume of the speaker - -# Celebration sound types -class CelebrationSound: - VICTORY_FANFARE = 0 - LEVEL_UP = 1 - SUCCESS_CHIME = 2 - TA_DA = 3 - POWER_UP = 4 - RICKROLL_INSPIRED = 5 - -async def play_victory_fanfare(): - """Classic victory fanfare""" - notes = [ - (262, 200), # C4 - (262, 200), # C4 - (262, 200), # C4 - (349, 600), # F4 - ] - - for freq, duration in notes: - await hub.speaker.beep(freq, duration) - await wait(50) -async def play_level_up(): - """Upward scale for level completion""" - notesold = [ - (262, 100), # C4 - (294, 100), # D4 - (330, 100), # E4 - (349, 100), # F4 - (392, 100), # G4 - (440, 100), # A4 - (494, 100), # B4 - (523, 300), # C5 - ] - notes = [ - (277, 100), - (330, 100), - (277, 100), - (554, 100), - (277, 100), - (413, 100), - (330, 100), - (277, 100), - (413, 100), - (277, 100), - (554, 100), - (413, 100), - (277, 100), - (413, 100), - (554, 100), - (413, 100) - ] - - for freq, duration in notes: - await hub.speaker.beep(freq, duration) - #await wait(20) -async def play_success_chime(): - """Simple success notification""" - notes = [ - (523, 150), # C5 - (659, 150), # E5 - (784, 300), # G5 - ] - - for freq, duration in notes: - await hub.speaker.beep(freq, duration) - await wait(50) -async def play_ta_da(): - """Classic "ta-da!" sound""" - notes = [ - (392, 200), # G4 - (523, 400), # C5 - ] - - for freq, duration in notes: - await hub.speaker.beep(freq, duration) - await wait(100) -async def play_power_up(): - """Rising power-up sound""" - for freq in range(200, 800, 50): - await hub.speaker.beep(freq, 50) - await wait(10) - await hub.speaker.beep(1000, 200) -async def play_rickroll_inspired(): - """Fun 80s-style dance beat inspired sound""" - # Upbeat bouncy rhythm - pattern = [ - (392, 200), (440, 200), (494, 200), (523, 200), - (440, 200), (392, 200), (349, 200), (392, 300), - (440, 200), (392, 200), (349, 200), (330, 400), - ] - - for freq, duration in pattern: - await hub.speaker.beep(freq, duration) - await wait(50) -async def celebrate_mission_complete(sound_type=CelebrationSound.SUCCESS_CHIME): - """ - Main celebration function to call after completing a mission. - Plays a sound and shows light animation. - - Args: - sound_type: CelebrationSound enum value (default: SUCCESS_CHIME) - """ - # Light show - hub.light.on(Color.GREEN) - - # Play the selected celebration sound - if sound_type == CelebrationSound.VICTORY_FANFARE: - await play_victory_fanfare() - elif sound_type == CelebrationSound.LEVEL_UP: - await play_level_up() - elif sound_type == CelebrationSound.SUCCESS_CHIME: - await play_success_chime() - elif sound_type == CelebrationSound.TA_DA: - await play_ta_da() - elif sound_type == CelebrationSound.POWER_UP: - await play_power_up() - elif sound_type == CelebrationSound.RICKROLL_INSPIRED: - await play_rickroll_inspired() - else: - await play_success_chime() # Default fallback - - # Blink the light - for _ in range(3): - hub.light.off() - await wait(100) - hub.light.on(Color.GREEN) - await wait(100) - - hub.light.off() - -WALL_DISTANCE = 200 # mm -async def drive_forward(): - """Drive forward continuously using DriveBase.""" - #await drive_base.straight(5000) - drive_base.drive(400,0) -async def monitor_distance(): - """Monitor ultrasonic sensor and stop when wall is detected.""" - while True: - distance = await lazer_ranger.distance() - - if distance < WALL_DISTANCE: - # Stop the drivebase - await drive_base.turn(-180) - drive_base.brake - print(f"Wall detected at {distance}mm!") - break - - # Small delay to prevent overwhelming the sensor - await wait(50) - -async def Run1(): #From M8_5.py - left_arm.run_angle(1000, 300) - right_arm.run_angle(1000,500) - await drive_base.straight(320) - - await right_arm.run_angle(5000,-500, Stop.HOLD) - await right_arm.run_angle(5000,500, Stop.HOLD) - await right_arm.run_angle(5000,-500, Stop.HOLD) - await right_arm.run_angle(5000,500, Stop.HOLD) - await right_arm.run_angle(5000,-500, Stop.HOLD) - - await drive_base.turn(-20) - await drive_base.straight(277) - await drive_base.turn(20) - await drive_base.straight(65) - - await drive_base.turn(-30) - right_arm.run_angle(50,500) - await drive_base.turn(45) - await drive_base.straight(-145) - await drive_base.turn(-60) - await drive_base.straight(90) - await left_arm.run_angle(1000,-450) - await drive_base.straight(-145) - await left_arm.run_angle(1000,450) - await drive_base.straight(10) - await drive_base.turn(35) - await drive_base.straight(-600) - -async def Run2(): #From Heavy_lifting_final.py - await drive_base.straight(200) - await drive_base.turn(-20) - await drive_base.straight(536) - await drive_base.turn(60, Stop.HOLD) - await drive_base.straight(30) - - await right_arm.run_angle(5000,2900) - await drive_base.straight(40) - await right_arm.run_angle(5000,-4000) - await drive_base.straight(-60) - - await drive_base.turn(-60) - await drive_base.straight(-670) - - -async def Run3(): #tip the scale.py - drive_base.settings(300,1000,300,200) #Custom drive_base setting based on Ayaan's code - - left_arm.run_angle(500,200) - right_arm.run_angle(500,200) - await drive_base.straight(70) - - await drive_base.turn(-55) - await drive_base.straight(900) - await drive_base.turn(92.5) - - await drive_base.straight(75) - await drive_base.straight(21) - await right_arm.run_angle(500,-250) - await right_arm.run_angle(500,250) - await drive_base.turn(55) - - await left_arm.run_angle(300,-400) - - await drive_base.turn(46.5) - await drive_base.turn(-40) - await drive_base.straight(900) - - drive_base.settings(600,500,300,200) #Reset it to the initial values - -async def Run4(): #From Send_Over_Final.py - - #Get to mission - await drive_base.straight(920) - await drive_base.turn(-90,Stop.HOLD) - await drive_base.straight(65) - #Solve mission - drive_base.turn(-10) - await left_arm.run_angle(10000,-4000) - #Get to Red Start - await drive_base.straight(-110) - await drive_base.turn(90) - await drive_base.straight(500) - - # while True: - # distance_mm = await lazer_ranger.distance() - # print('distancing...',distance_mm) - - # if distance_mm < 300: - # drive_base.stop - # break - # else: - # drive_base.straight(300) - # print('running...') - # await wait(10) - await multitask( - drive_forward(), - monitor_distance() - ) - -#Add Rishi's code here -async def Run5(): - pass - -#Add - Adi's code here -async def Run6(): - pass - -async def main(): - while True: - - #await celebrate_mission_complete(CelebrationSound.LEVEL_UP) - color_reflected_percent = await color_sensor.reflection() - print(color_reflected_percent) - - - if color_reflected_percent > 1: # Make sure we actually have color reflections before checking for color - color_detected = await color_sensor.color() # Moved this inside the if clause - print(f'Detected color:{color_detected} : {color_detected.h}, {color_detected.s}, {color_detected.v}') - - if color_detected == Color.GREEN: - print('Running Mission 1') - await Run1() - #await celebrate_mission_complete(CelebrationSound.VICTORY_FANFARE) - elif color_detected == Color.WHITE: - print('Running Mission 2') - await Run2() - #await celebrate_mission_complete(CelebrationSound.RICKROLL_INSPIRED) - elif color_detected == Color.RED: - print('Running Mission 3') - await Run3() - #await celebrate_mission_complete(CelebrationSound.SUCCESS_CHIME ) - elif color_detected == Color.YELLOW: - print('Running Mission 4') - await Run4() - #await celebrate_mission_complete(CelebrationSound.POWER_UP) - elif color_detected == Color.BLUE: - print('Running Mission 5') - await Run5() - #await celebrate_mission_complete(CelebrationSound.LEVEL_UP) - elif color_detected == Color.VIOLET: - print('Running Mission 6') - await Run6() - else: - hub.light.off() - left_motor.stop() - right_motor.stop() - color_detected = Color.NONE - else: - color_detected = Color.NONE - - await wait(1000) #prevent loop from iterating fast -# Main execution loop -run_task(main()) -- 2.49.1 From a16d5deb926ea527d50e4051b302fba486ea7202 Mon Sep 17 00:00:00 2001 From: Atharv <30nagava@elmbrookstudents.org> Date: Thu, 23 Oct 2025 00:35:38 +0000 Subject: [PATCH 48/70] Update codes_for_scrimmage/hazmat/hazmat_main.py --- codes_for_scrimmage/hazmat/hazmat_main.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/codes_for_scrimmage/hazmat/hazmat_main.py b/codes_for_scrimmage/hazmat/hazmat_main.py index 0bb9103..d314b77 100644 --- a/codes_for_scrimmage/hazmat/hazmat_main.py +++ b/codes_for_scrimmage/hazmat/hazmat_main.py @@ -29,13 +29,11 @@ print("Default Detected Colors:", color_sensor.detectable_colors()) # Custom color Hue, Saturation, Brightness value for Lego bricks Color.MAGENTA = Color(300,100,100) -Color.VIOLET = Color(270,100,100) -Color.ORANGE = Color(17,78,15) +Color.VIOLET = Color(277,68,32) Color.BLUE = Color(240,100,100) Color.CYAN = Color(180,100,100) LEGO_BRICKS_COLOR = [ - Color.ORANGE, Color.BLUE, Color.GREEN, Color.WHITE, @@ -349,7 +347,7 @@ async def main(): print(color_reflected_percent) - if color_reflected_percent > 5: # Make sure we actually have color reflections before checking for color + if color_reflected_percent > 0: # Make sure we actually have color reflections before checking for color color_detected = await color_sensor.color() # Moved this inside the if clause print(f'Detected color:{color_detected} : {color_detected.h}, {color_detected.s}, {color_detected.v}') @@ -373,7 +371,7 @@ async def main(): print('Running Mission 5') await Run5() #await celebrate_mission_complete(CelebrationSound.LEVEL_UP) - elif color_detected == Color.ORANGE: + elif color_detected == Color.VIOLET: print('Running Mission 6') await Run6() else: -- 2.49.1 From 819b22261051db963f9aa00202b0333c8424bc9f Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Thu, 23 Oct 2025 00:38:23 +0000 Subject: [PATCH 49/70] Update codes_for_scrimmage/hazmat/hazmat_main.py --- codes_for_scrimmage/hazmat/hazmat_main.py | 27 ++++++++++------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/codes_for_scrimmage/hazmat/hazmat_main.py b/codes_for_scrimmage/hazmat/hazmat_main.py index d314b77..eb1542c 100644 --- a/codes_for_scrimmage/hazmat/hazmat_main.py +++ b/codes_for_scrimmage/hazmat/hazmat_main.py @@ -230,22 +230,19 @@ async def Run1(): #From M8_5.py await drive_base.straight(-600) async def Run2(): #From Heavy_lifting_final.py - #Get to mission - await drive_base.straight(200) + await drive_base.straight(200) await drive_base.turn(-20) - await drive_base.straight(525) - await drive_base.turn(60) - #Solve mission - await drive_base.straight(50) - await right_arm.run_angle(2000,1000) - await drive_base.straight(-50) - await drive_base.turn(45) - await drive_base.straight(50) - await right_arm.run_angle(350,-1000) - #Return home - await drive_base.straight(-100) - await drive_base.turn(-100) - await drive_base.straight(-600) + await drive_base.straight(536) + await drive_base.turn(60, Stop.HOLD) + await drive_base.straight(30) + + await right_arm.run_angle(5000,2900) + await drive_base.straight(40) + await right_arm.run_angle(5000,-4000) + await drive_base.straight(-60) + + await drive_base.turn(-60) + await drive_base.straight(-670) async def Run3(): #tip the scale.py -- 2.49.1 From 9e0c82b26b76e71b12905b52881d7de2bc3a8d6f Mon Sep 17 00:00:00 2001 From: Ayaan <32agarwa@elmbrookstudents.org> Date: Thu, 23 Oct 2025 00:52:26 +0000 Subject: [PATCH 50/70] Update missions/tip the scale.py --- missions/tip the scale.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/missions/tip the scale.py b/missions/tip the scale.py index 200b1ea..4573352 100644 --- a/missions/tip the scale.py +++ b/missions/tip the scale.py @@ -39,4 +39,7 @@ async def main(): await drive_base.turn(46.5) await drive_base.turn(-40) await drive_base.straight(900) -run_task(main()) \ No newline at end of file +run_task(main()) + + + -- 2.49.1 From 4ad60502b97074ee5c56cb9a8af00dadf236b0f8 Mon Sep 17 00:00:00 2001 From: Rishikesh Lolapu <31lolapr@elmbrookstudents.org> Date: Thu, 23 Oct 2025 02:14:42 +0000 Subject: [PATCH 51/70] Add codes_for_scrimmage/hazmat/mainhazmatUPD.py --- codes_for_scrimmage/hazmat/mainhazmatUPD.py | 384 ++++++++++++++++++++ 1 file changed, 384 insertions(+) create mode 100644 codes_for_scrimmage/hazmat/mainhazmatUPD.py diff --git a/codes_for_scrimmage/hazmat/mainhazmatUPD.py b/codes_for_scrimmage/hazmat/mainhazmatUPD.py new file mode 100644 index 0000000..eb1542c --- /dev/null +++ b/codes_for_scrimmage/hazmat/mainhazmatUPD.py @@ -0,0 +1,384 @@ +from pybricks.pupdevices import Motor, ColorSensor, UltrasonicSensor, ForceSensor +from pybricks.parameters import Button, Color, Direction, Port, Side, Stop +from pybricks.tools import run_task, multitask +from pybricks.tools import wait, StopWatch +from pybricks.robotics import DriveBase +from pybricks.hubs import PrimeHub + +# Initialize hub and devices +hub = PrimeHub() + +left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) +right_motor = Motor(Port.B) + +left_arm = Motor(Port.C) +right_arm = Motor(Port.D) +lazer_ranger = UltrasonicSensor(Port.E) +color_sensor = ColorSensor(Port.F) + +# DriveBase configuration +WHEEL_DIAMETER = 68.8 # mm (adjust for your wheels) +AXLE_TRACK = 180 # mm (distance between wheels) +drive_base = DriveBase(left_motor, right_motor, WHEEL_DIAMETER, AXLE_TRACK) +drive_base.settings(600,500,300,200) +drive_base.use_gyro(True) + +# Color Settings +# https://docs.pybricks.com/en/latest/parameters/color.html +print("Default Detected Colors:", color_sensor.detectable_colors()) + +# Custom color Hue, Saturation, Brightness value for Lego bricks +Color.MAGENTA = Color(300,100,100) +Color.VIOLET = Color(277,68,32) +Color.BLUE = Color(240,100,100) +Color.CYAN = Color(180,100,100) + +LEGO_BRICKS_COLOR = [ + Color.BLUE, + Color.GREEN, + Color.WHITE, + Color.RED, + Color.YELLOW, + Color.MAGENTA, + Color.VIOLET, + Color.NONE +] +#Update Detectable colors +color_sensor.detectable_colors(LEGO_BRICKS_COLOR) + +print("Updated Detected Colors:", color_sensor.detectable_colors()) + +hub.speaker.volume(50) # Set the volume of the speaker + +# Celebration sound types +class CelebrationSound: + VICTORY_FANFARE = 0 + LEVEL_UP = 1 + SUCCESS_CHIME = 2 + TA_DA = 3 + POWER_UP = 4 + RICKROLL_INSPIRED = 5 + +async def play_victory_fanfare(): + """Classic victory fanfare""" + notes = [ + (262, 200), # C4 + (262, 200), # C4 + (262, 200), # C4 + (349, 600), # F4 + ] + + for freq, duration in notes: + await hub.speaker.beep(freq, duration) + await wait(50) +async def play_level_up(): + """Upward scale for level completion""" + notesold = [ + (262, 100), # C4 + (294, 100), # D4 + (330, 100), # E4 + (349, 100), # F4 + (392, 100), # G4 + (440, 100), # A4 + (494, 100), # B4 + (523, 300), # C5 + ] + notes = [ + (277, 100), + (330, 100), + (277, 100), + (554, 100), + (277, 100), + (413, 100), + (330, 100), + (277, 100), + (413, 100), + (277, 100), + (554, 100), + (413, 100), + (277, 100), + (413, 100), + (554, 100), + (413, 100) + ] + + for freq, duration in notes: + await hub.speaker.beep(freq, duration) + #await wait(20) +async def play_success_chime(): + """Simple success notification""" + notes = [ + (523, 150), # C5 + (659, 150), # E5 + (784, 300), # G5 + ] + + for freq, duration in notes: + await hub.speaker.beep(freq, duration) + await wait(50) +async def play_ta_da(): + """Classic "ta-da!" sound""" + notes = [ + (392, 200), # G4 + (523, 400), # C5 + ] + + for freq, duration in notes: + await hub.speaker.beep(freq, duration) + await wait(100) +async def play_power_up(): + """Rising power-up sound""" + for freq in range(200, 800, 50): + await hub.speaker.beep(freq, 50) + await wait(10) + await hub.speaker.beep(1000, 200) +async def play_rickroll_inspired(): + """Fun 80s-style dance beat inspired sound""" + # Upbeat bouncy rhythm + pattern = [ + (392, 200), (440, 200), (494, 200), (523, 200), + (440, 200), (392, 200), (349, 200), (392, 300), + (440, 200), (392, 200), (349, 200), (330, 400), + ] + + for freq, duration in pattern: + await hub.speaker.beep(freq, duration) + await wait(50) +async def celebrate_mission_complete(sound_type=CelebrationSound.SUCCESS_CHIME): + """ + Main celebration function to call after completing a mission. + Plays a sound and shows light animation. + + Args: + sound_type: CelebrationSound enum value (default: SUCCESS_CHIME) + """ + # Light show + hub.light.on(Color.GREEN) + + # Play the selected celebration sound + if sound_type == CelebrationSound.VICTORY_FANFARE: + await play_victory_fanfare() + elif sound_type == CelebrationSound.LEVEL_UP: + await play_level_up() + elif sound_type == CelebrationSound.SUCCESS_CHIME: + await play_success_chime() + elif sound_type == CelebrationSound.TA_DA: + await play_ta_da() + elif sound_type == CelebrationSound.POWER_UP: + await play_power_up() + elif sound_type == CelebrationSound.RICKROLL_INSPIRED: + await play_rickroll_inspired() + else: + await play_success_chime() # Default fallback + + # Blink the light + for _ in range(3): + hub.light.off() + await wait(100) + hub.light.on(Color.GREEN) + await wait(100) + + hub.light.off() + +WALL_DISTANCE = 200 # mm +async def drive_forward(): + """Drive forward continuously using DriveBase.""" + #await drive_base.straight(5000) + drive_base.drive(400,0) +async def monitor_distance(): + """Monitor ultrasonic sensor and stop when wall is detected.""" + while True: + distance = await lazer_ranger.distance() + + if distance < WALL_DISTANCE: + # Stop the drivebase + await drive_base.turn(-180) + drive_base.brake + print(f"Wall detected at {distance}mm!") + break + + # Small delay to prevent overwhelming the sensor + await wait(50) + +async def Run1(): #From M8_5.py + left_arm.run_angle(1000, 300) + right_arm.run_angle(1000,500) + await drive_base.straight(320) + + await right_arm.run_angle(5000,-500, Stop.HOLD) + await right_arm.run_angle(5000,500, Stop.HOLD) + await right_arm.run_angle(5000,-500, Stop.HOLD) + await right_arm.run_angle(5000,500, Stop.HOLD) + await right_arm.run_angle(5000,-500, Stop.HOLD) + + await drive_base.turn(-20) + await drive_base.straight(277) + await drive_base.turn(20) + await drive_base.straight(65) + + await drive_base.turn(-30) + right_arm.run_angle(50,500) + await drive_base.turn(45) + await drive_base.straight(-145) + await drive_base.turn(-60) + await drive_base.straight(90) + await left_arm.run_angle(1000,-450) + await drive_base.straight(-145) + await left_arm.run_angle(1000,450) + await drive_base.straight(10) + await drive_base.turn(35) + await drive_base.straight(-600) + +async def Run2(): #From Heavy_lifting_final.py + await drive_base.straight(200) + await drive_base.turn(-20) + await drive_base.straight(536) + await drive_base.turn(60, Stop.HOLD) + await drive_base.straight(30) + + await right_arm.run_angle(5000,2900) + await drive_base.straight(40) + await right_arm.run_angle(5000,-4000) + await drive_base.straight(-60) + + await drive_base.turn(-60) + await drive_base.straight(-670) + + +async def Run3(): #tip the scale.py + drive_base.settings(300,1000,300,200) #Custom drive_base setting based on Ayaan's code + + left_arm.run_angle(500,200) + right_arm.run_angle(500,200) + await drive_base.straight(70) + + await drive_base.turn(-55) + await drive_base.straight(900) + await drive_base.turn(92.5) + + await drive_base.straight(75) + await drive_base.straight(21) + await right_arm.run_angle(500,-250) + await right_arm.run_angle(500,250) + await drive_base.turn(55) + + await left_arm.run_angle(300,-400) + + await drive_base.turn(46.5) + await drive_base.turn(-40) + await drive_base.straight(900) + + drive_base.settings(600,500,300,200) #Reset it to the initial values + +async def Run4(): #From Send_Over_Final.py + + #Get to mission + await drive_base.straight(920) + await drive_base.turn(-90,Stop.HOLD) + await drive_base.straight(65) + #Solve mission + drive_base.turn(-10) + await left_arm.run_angle(10000,-4000) + #Get to Red Start + await drive_base.straight(-110) + await drive_base.turn(90) + await drive_base.straight(500) + + # while True: + # distance_mm = await lazer_ranger.distance() + # print('distancing...',distance_mm) + + # if distance_mm < 300: + # drive_base.stop + # break + # else: + # drive_base.straight(300) + # print('running...') + # await wait(10) + await multitask( + drive_forward(), + monitor_distance() + ) + +#Add Rishi's code here +async def Run5(): + await drive_base.straight(519) + await left_arm.run_angle(-10000, 300) + await left_arm.run_angle(10000, 600) + await drive_base.straight(160) + await drive_base.turn(-30) + await drive_base.straight(50) + await right_arm.run_angle(3000, 3000) + await drive_base.straight(-150) + await drive_base.turn(135) + await drive_base.straight(25) + await right_arm.run_angle(10000, -3000) + await drive_base.straight(-100) + await drive_base.turn(-55) + await right_arm.run_angle(10000, -3000) + await drive_base.straight(250) + await drive_base.turn(-5) + await right_arm.run_angle(10000, 7000) + await drive_base.straight(-50) + await drive_base.turn(45) + await drive_base.straight(100) + await drive_base.turn(37) + await right_arm.run_angle(10000, -6000) + await drive_base.straight(90) + await right_arm.run_angle(3000, 3000) + await drive_base.turn(-40) + +#Add - Adi's code here +async def Run6(): + await drive_base.straight(420) + await right_arm.run_angle(300,-100) + await drive_base.straight(-100) + await right_arm.run_angle(300, 100) + await drive_base.straight(-350) + +async def main(): + while True: + + #await celebrate_mission_complete(CelebrationSound.LEVEL_UP) + color_reflected_percent = await color_sensor.reflection() + print(color_reflected_percent) + + + if color_reflected_percent > 0: # Make sure we actually have color reflections before checking for color + color_detected = await color_sensor.color() # Moved this inside the if clause + print(f'Detected color:{color_detected} : {color_detected.h}, {color_detected.s}, {color_detected.v}') + + if color_detected == Color.GREEN: + print('Running Mission 1') + await Run1() + #await celebrate_mission_complete(CelebrationSound.VICTORY_FANFARE) + elif color_detected == Color.WHITE: + print('Running Mission 2') + await Run2() + #await celebrate_mission_complete(CelebrationSound.RICKROLL_INSPIRED) + elif color_detected == Color.RED: + print('Running Mission 3') + await Run3() + #await celebrate_mission_complete(CelebrationSound.SUCCESS_CHIME ) + elif color_detected == Color.YELLOW: + print('Running Mission 4') + await Run4() + #await celebrate_mission_complete(CelebrationSound.POWER_UP) + elif color_detected == Color.BLUE: + print('Running Mission 5') + await Run5() + #await celebrate_mission_complete(CelebrationSound.LEVEL_UP) + elif color_detected == Color.VIOLET: + print('Running Mission 6') + await Run6() + else: + hub.light.off() + left_motor.stop() + right_motor.stop() + color_detected = Color.NONE + else: + color_detected = Color.NONE + + await wait(1000) #prevent loop from iterating fast +# Main execution loop +run_task(main()) -- 2.49.1 From acfe0e622e38a9daec254fe27f7ebbfb06a215b2 Mon Sep 17 00:00:00 2001 From: Rishikesh Lolapu <31lolapr@elmbrookstudents.org> Date: Thu, 23 Oct 2025 02:30:26 +0000 Subject: [PATCH 52/70] Update codes_for_scrimmage/hazmat/mainhazmatUPD.py This is the new version of Hazmat Code with the colors. Check to see if your color is different. Only Run2 is different, it was white, now violet. --- codes_for_scrimmage/hazmat/mainhazmatUPD.py | 239 ++++---------------- 1 file changed, 38 insertions(+), 201 deletions(-) diff --git a/codes_for_scrimmage/hazmat/mainhazmatUPD.py b/codes_for_scrimmage/hazmat/mainhazmatUPD.py index eb1542c..37a00a9 100644 --- a/codes_for_scrimmage/hazmat/mainhazmatUPD.py +++ b/codes_for_scrimmage/hazmat/mainhazmatUPD.py @@ -23,168 +23,13 @@ drive_base = DriveBase(left_motor, right_motor, WHEEL_DIAMETER, AXLE_TRACK) drive_base.settings(600,500,300,200) drive_base.use_gyro(True) -# Color Settings -# https://docs.pybricks.com/en/latest/parameters/color.html -print("Default Detected Colors:", color_sensor.detectable_colors()) - -# Custom color Hue, Saturation, Brightness value for Lego bricks -Color.MAGENTA = Color(300,100,100) -Color.VIOLET = Color(277,68,32) -Color.BLUE = Color(240,100,100) -Color.CYAN = Color(180,100,100) - -LEGO_BRICKS_COLOR = [ - Color.BLUE, - Color.GREEN, - Color.WHITE, - Color.RED, - Color.YELLOW, - Color.MAGENTA, - Color.VIOLET, - Color.NONE -] -#Update Detectable colors -color_sensor.detectable_colors(LEGO_BRICKS_COLOR) - -print("Updated Detected Colors:", color_sensor.detectable_colors()) - -hub.speaker.volume(50) # Set the volume of the speaker - -# Celebration sound types -class CelebrationSound: - VICTORY_FANFARE = 0 - LEVEL_UP = 1 - SUCCESS_CHIME = 2 - TA_DA = 3 - POWER_UP = 4 - RICKROLL_INSPIRED = 5 - -async def play_victory_fanfare(): - """Classic victory fanfare""" - notes = [ - (262, 200), # C4 - (262, 200), # C4 - (262, 200), # C4 - (349, 600), # F4 - ] - - for freq, duration in notes: - await hub.speaker.beep(freq, duration) - await wait(50) -async def play_level_up(): - """Upward scale for level completion""" - notesold = [ - (262, 100), # C4 - (294, 100), # D4 - (330, 100), # E4 - (349, 100), # F4 - (392, 100), # G4 - (440, 100), # A4 - (494, 100), # B4 - (523, 300), # C5 - ] - notes = [ - (277, 100), - (330, 100), - (277, 100), - (554, 100), - (277, 100), - (413, 100), - (330, 100), - (277, 100), - (413, 100), - (277, 100), - (554, 100), - (413, 100), - (277, 100), - (413, 100), - (554, 100), - (413, 100) - ] - - for freq, duration in notes: - await hub.speaker.beep(freq, duration) - #await wait(20) -async def play_success_chime(): - """Simple success notification""" - notes = [ - (523, 150), # C5 - (659, 150), # E5 - (784, 300), # G5 - ] - - for freq, duration in notes: - await hub.speaker.beep(freq, duration) - await wait(50) -async def play_ta_da(): - """Classic "ta-da!" sound""" - notes = [ - (392, 200), # G4 - (523, 400), # C5 - ] - - for freq, duration in notes: - await hub.speaker.beep(freq, duration) - await wait(100) -async def play_power_up(): - """Rising power-up sound""" - for freq in range(200, 800, 50): - await hub.speaker.beep(freq, 50) - await wait(10) - await hub.speaker.beep(1000, 200) -async def play_rickroll_inspired(): - """Fun 80s-style dance beat inspired sound""" - # Upbeat bouncy rhythm - pattern = [ - (392, 200), (440, 200), (494, 200), (523, 200), - (440, 200), (392, 200), (349, 200), (392, 300), - (440, 200), (392, 200), (349, 200), (330, 400), - ] - - for freq, duration in pattern: - await hub.speaker.beep(freq, duration) - await wait(50) -async def celebrate_mission_complete(sound_type=CelebrationSound.SUCCESS_CHIME): - """ - Main celebration function to call after completing a mission. - Plays a sound and shows light animation. - - Args: - sound_type: CelebrationSound enum value (default: SUCCESS_CHIME) - """ - # Light show - hub.light.on(Color.GREEN) - - # Play the selected celebration sound - if sound_type == CelebrationSound.VICTORY_FANFARE: - await play_victory_fanfare() - elif sound_type == CelebrationSound.LEVEL_UP: - await play_level_up() - elif sound_type == CelebrationSound.SUCCESS_CHIME: - await play_success_chime() - elif sound_type == CelebrationSound.TA_DA: - await play_ta_da() - elif sound_type == CelebrationSound.POWER_UP: - await play_power_up() - elif sound_type == CelebrationSound.RICKROLL_INSPIRED: - await play_rickroll_inspired() - else: - await play_success_chime() # Default fallback - - # Blink the light - for _ in range(3): - hub.light.off() - await wait(100) - hub.light.on(Color.GREEN) - await wait(100) - - hub.light.off() WALL_DISTANCE = 200 # mm async def drive_forward(): """Drive forward continuously using DriveBase.""" #await drive_base.straight(5000) drive_base.drive(400,0) + async def monitor_distance(): """Monitor ultrasonic sensor and stop when wall is detected.""" while True: @@ -200,6 +45,7 @@ async def monitor_distance(): # Small delay to prevent overwhelming the sensor await wait(50) +#New Section async def Run1(): #From M8_5.py left_arm.run_angle(1000, 300) right_arm.run_angle(1000,500) @@ -336,49 +182,40 @@ async def Run6(): await right_arm.run_angle(300, 100) await drive_base.straight(-350) -async def main(): - while True: - - #await celebrate_mission_complete(CelebrationSound.LEVEL_UP) - color_reflected_percent = await color_sensor.reflection() - print(color_reflected_percent) - - - if color_reflected_percent > 0: # Make sure we actually have color reflections before checking for color - color_detected = await color_sensor.color() # Moved this inside the if clause - print(f'Detected color:{color_detected} : {color_detected.h}, {color_detected.s}, {color_detected.v}') - - if color_detected == Color.GREEN: - print('Running Mission 1') - await Run1() - #await celebrate_mission_complete(CelebrationSound.VICTORY_FANFARE) - elif color_detected == Color.WHITE: - print('Running Mission 2') - await Run2() - #await celebrate_mission_complete(CelebrationSound.RICKROLL_INSPIRED) - elif color_detected == Color.RED: - print('Running Mission 3') - await Run3() - #await celebrate_mission_complete(CelebrationSound.SUCCESS_CHIME ) - elif color_detected == Color.YELLOW: - print('Running Mission 4') - await Run4() - #await celebrate_mission_complete(CelebrationSound.POWER_UP) - elif color_detected == Color.BLUE: - print('Running Mission 5') - await Run5() - #await celebrate_mission_complete(CelebrationSound.LEVEL_UP) - elif color_detected == Color.VIOLET: - print('Running Mission 6') - await Run6() - else: - hub.light.off() - left_motor.stop() - right_motor.stop() - color_detected = Color.NONE +# Function to classify color based on HSV +async def main: + if reflected > 4: + if h < 4 or h > 350: #red + return "Red" + print('Running Mission 3') + await Run3() + elif 3 < h < 40 and s > 70: #orange + return "Orange" + print('Running Mission 6') + await Run6() + elif 47 < h < 56: #yellow + return "Yellow" + print('Running Mission 4') + await Run4() + elif 70 < h < 160: #green - do it vertically not horizontally for accuracy + return "Green" + print('Running Mission 1') + await Run1() + elif 210 < h < 225: #blue - do it vertically not horizontally for accuracy + return "Blue" + print('Running Mission 5') + await Run5() + elif 230 < h < 320: #purple + return "Purple" + print('Running Mission 2') + await Run2() else: - color_detected = Color.NONE - - await wait(1000) #prevent loop from iterating fast -# Main execution loop -run_task(main()) + return "Unknown" + +# Main loop +while True: + h, s, v = sensor.hsv() + reflected = sensor.reflection() + color = detect_color(h, s, v, reflected) + print(f"Detected Color: {color} (Hue: {h}, Sat: {s}, Val: {v})") + wait(1000) -- 2.49.1 From 1dec912abbc9ad9c00b226530f252021fb480e40 Mon Sep 17 00:00:00 2001 From: Ayaan <32agarwa@elmbrookstudents.org> Date: Fri, 24 Oct 2025 00:11:38 +0000 Subject: [PATCH 53/70] Update missions/tip the scale.py --- missions/tip the scale.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/missions/tip the scale.py b/missions/tip the scale.py index 4573352..3a4264e 100644 --- a/missions/tip the scale.py +++ b/missions/tip the scale.py @@ -15,31 +15,34 @@ left_arm = Motor(Port.C, Direction.COUNTERCLOCKWISE) right_arm = Motor(Port.D) drive_base = DriveBase(left_motor, right_motor, wheel_diameter=68.8, axle_track=180) -drive_base.settings(300,1000,300,200) +drive_base.settings(600,500,300,200) -#drive_base.use_gyro(True) +drive_base.use_gyro(True) async def main(): - left_arm.run_angle(500,200) + left_arm.run_angle(600,200) right_arm.run_angle(500,200) await drive_base.straight(70) - await drive_base.turn(-55) + await drive_base.turn(-70) await drive_base.straight(900) - await drive_base.turn(92.5) + await drive_base.turn(115) await drive_base.straight(75) - await drive_base.straight(21) + await drive_base.straight(33) await right_arm.run_angle(500,-250) await right_arm.run_angle(500,250) - await drive_base.turn(55) + await drive_base.turn(66) + await drive_base.straight(7) - await left_arm.run_angle(300,-400) + await left_arm.run_angle(560,-390) #going down + print('turning now...') + await drive_base.turn(40) # turning right + await left_arm.run_angle(-410,-400) #lift a little bit - await drive_base.turn(46.5) + await drive_base.turn(-46.5) #ma din din din dun await drive_base.turn(-40) await drive_base.straight(900) run_task(main()) - -- 2.49.1 From 2d2863726b6296c9dca0c8c0a18be051e97dcccc Mon Sep 17 00:00:00 2001 From: Vickram <31kapoov@elmbrookstudents.org> Date: Fri, 24 Oct 2025 00:35:06 +0000 Subject: [PATCH 54/70] Update codes_for_scrimmage/hazmat/mainhazmatUPD.py --- codes_for_scrimmage/hazmat/mainhazmatUPD.py | 164 ++++++++++---------- 1 file changed, 80 insertions(+), 84 deletions(-) diff --git a/codes_for_scrimmage/hazmat/mainhazmatUPD.py b/codes_for_scrimmage/hazmat/mainhazmatUPD.py index 37a00a9..a243e83 100644 --- a/codes_for_scrimmage/hazmat/mainhazmatUPD.py +++ b/codes_for_scrimmage/hazmat/mainhazmatUPD.py @@ -7,95 +7,88 @@ from pybricks.hubs import PrimeHub # Initialize hub and devices hub = PrimeHub() - left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) right_motor = Motor(Port.B) - left_arm = Motor(Port.C) right_arm = Motor(Port.D) -lazer_ranger = UltrasonicSensor(Port.E) +lazer_ranger = UltrasonicSensor(Port.E) color_sensor = ColorSensor(Port.F) # DriveBase configuration WHEEL_DIAMETER = 68.8 # mm (adjust for your wheels) AXLE_TRACK = 180 # mm (distance between wheels) drive_base = DriveBase(left_motor, right_motor, WHEEL_DIAMETER, AXLE_TRACK) -drive_base.settings(600,500,300,200) +drive_base.settings(600, 500, 300, 200) drive_base.use_gyro(True) - WALL_DISTANCE = 200 # mm + async def drive_forward(): """Drive forward continuously using DriveBase.""" - #await drive_base.straight(5000) - drive_base.drive(400,0) + drive_base.drive(400, 0) + async def monitor_distance(): """Monitor ultrasonic sensor and stop when wall is detected.""" while True: - distance = await lazer_ranger.distance() + distance = lazer_ranger.distance() if distance < WALL_DISTANCE: # Stop the drivebase await drive_base.turn(-180) - drive_base.brake + drive_base.brake() print(f"Wall detected at {distance}mm!") break # Small delay to prevent overwhelming the sensor await wait(50) -#New Section -async def Run1(): #From M8_5.py +# New Section +async def Run1(): # From M8_5.py left_arm.run_angle(1000, 300) - right_arm.run_angle(1000,500) + right_arm.run_angle(1000, 500) await drive_base.straight(320) - - await right_arm.run_angle(5000,-500, Stop.HOLD) - await right_arm.run_angle(5000,500, Stop.HOLD) - await right_arm.run_angle(5000,-500, Stop.HOLD) - await right_arm.run_angle(5000,500, Stop.HOLD) - await right_arm.run_angle(5000,-500, Stop.HOLD) - + await right_arm.run_angle(5000, -500, Stop.HOLD) + await right_arm.run_angle(5000, 500, Stop.HOLD) + await right_arm.run_angle(5000, -500, Stop.HOLD) + await right_arm.run_angle(5000, 500, Stop.HOLD) + await right_arm.run_angle(5000, -500, Stop.HOLD) await drive_base.turn(-20) await drive_base.straight(277) await drive_base.turn(20) await drive_base.straight(65) - await drive_base.turn(-30) - right_arm.run_angle(50,500) + right_arm.run_angle(50, 500) await drive_base.turn(45) await drive_base.straight(-145) await drive_base.turn(-60) await drive_base.straight(90) - await left_arm.run_angle(1000,-450) + await left_arm.run_angle(1000, -450) await drive_base.straight(-145) - await left_arm.run_angle(1000,450) + await left_arm.run_angle(1000, 450) await drive_base.straight(10) await drive_base.turn(35) await drive_base.straight(-600) -async def Run2(): #From Heavy_lifting_final.py - await drive_base.straight(200) +async def Run2(): # From Heavy_lifting_final.py + await drive_base.straight(200) await drive_base.turn(-20) await drive_base.straight(536) await drive_base.turn(60, Stop.HOLD) await drive_base.straight(30) - - await right_arm.run_angle(5000,2900) + await right_arm.run_angle(5000, 2900) await drive_base.straight(40) - await right_arm.run_angle(5000,-4000) + await right_arm.run_angle(5000, -4000) await drive_base.straight(-60) - await drive_base.turn(-60) await drive_base.straight(-670) -async def Run3(): #tip the scale.py - drive_base.settings(300,1000,300,200) #Custom drive_base setting based on Ayaan's code +async def Run3(): # tip the scale.py + drive_base.settings(300, 1000, 300, 200) # Custom drive_base setting based on Ayaan's code - left_arm.run_angle(500,200) - right_arm.run_angle(500,200) + left_arm.run_angle(500, 200) + right_arm.run_angle(500, 200) await drive_base.straight(70) await drive_base.turn(-55) @@ -104,49 +97,38 @@ async def Run3(): #tip the scale.py await drive_base.straight(75) await drive_base.straight(21) - await right_arm.run_angle(500,-250) - await right_arm.run_angle(500,250) + await right_arm.run_angle(500, -250) + await right_arm.run_angle(500, 250) await drive_base.turn(55) - await left_arm.run_angle(300,-400) + await left_arm.run_angle(300, -400) await drive_base.turn(46.5) await drive_base.turn(-40) await drive_base.straight(900) + drive_base.settings(600, 500, 300, 200) # Reset it to the initial values - drive_base.settings(600,500,300,200) #Reset it to the initial values -async def Run4(): #From Send_Over_Final.py - - #Get to mission +async def Run4(): # From Send_Over_Final.py + # Get to mission await drive_base.straight(920) - await drive_base.turn(-90,Stop.HOLD) + await drive_base.turn(-90, Stop.HOLD) await drive_base.straight(65) - #Solve mission + # Solve mission drive_base.turn(-10) - await left_arm.run_angle(10000,-4000) - #Get to Red Start + await left_arm.run_angle(10000, -4000) + # Get to Red Start await drive_base.straight(-110) await drive_base.turn(90) await drive_base.straight(500) - # while True: - # distance_mm = await lazer_ranger.distance() - # print('distancing...',distance_mm) - - # if distance_mm < 300: - # drive_base.stop - # break - # else: - # drive_base.straight(300) - # print('running...') - # await wait(10) await multitask( drive_forward(), monitor_distance() ) -#Add Rishi's code here + +# Add Rishi's code here async def Run5(): await drive_base.straight(519) await left_arm.run_angle(-10000, 300) @@ -174,48 +156,62 @@ async def Run5(): await right_arm.run_angle(3000, 3000) await drive_base.turn(-40) -#Add - Adi's code here + +# Add - Adi's code here async def Run6(): await drive_base.straight(420) - await right_arm.run_angle(300,-100) + await right_arm.run_angle(300, -100) await drive_base.straight(-100) await right_arm.run_angle(300, 100) await drive_base.straight(-350) + # Function to classify color based on HSV -async def main: +def detect_color(h, s, v, reflected): if reflected > 4: - if h < 4 or h > 350: #red + if h < 4 or h > 350: # red return "Red" - print('Running Mission 3') - await Run3() - elif 3 < h < 40 and s > 70: #orange + elif 3 < h < 40 and s > 70: # orange return "Orange" - print('Running Mission 6') - await Run6() - elif 47 < h < 56: #yellow + elif 47 < h < 56: # yellow return "Yellow" - print('Running Mission 4') - await Run4() - elif 70 < h < 160: #green - do it vertically not horizontally for accuracy + elif 70 < h < 160: # green - do it vertically not horizontally for accuracy return "Green" - print('Running Mission 1') - await Run1() - elif 210 < h < 225: #blue - do it vertically not horizontally for accuracy + elif 210 < h < 225: # blue - do it vertically not horizontally for accuracy return "Blue" - print('Running Mission 5') - await Run5() - elif 230 < h < 320: #purple + elif 260 < h < 350: # purple return "Purple" - print('Running Mission 2') - await Run2() else: return "Unknown" + return "Unknown" -# Main loop -while True: - h, s, v = sensor.hsv() - reflected = sensor.reflection() - color = detect_color(h, s, v, reflected) - print(f"Detected Color: {color} (Hue: {h}, Sat: {s}, Val: {v})") - wait(1000) + +async def main(): + while True: + h, s, v = await color_sensor.hsv() + reflected = await color_sensor.reflection() + color = detect_color(h, s, v, reflected) + + if color == "Red": + print('Running Mission 3') + await Run3() #red + elif color == "Orange": + print('Running Mission 6') + await Run6() #orange + elif color == "Yellow": + print('Running Mission 4') + await Run4() #yellow + elif color == "Green": + print('Running Mission 1') + await Run1() #green - vertically + elif color == "Blue": + print('Running Mission 5') + await Run5() #blue - vertically + elif color == "Purple": + print('Running Mission 2') + await Run2() #purple - vertically + 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 -- 2.49.1 From 32a695e9ca07ca6fd10974b9ac0f981b0394ea1c Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Fri, 24 Oct 2025 00:38:26 +0000 Subject: [PATCH 55/70] Update codes_for_scrimmage/hazmat/hazmat_main.py --- codes_for_scrimmage/hazmat/hazmat_main.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/codes_for_scrimmage/hazmat/hazmat_main.py b/codes_for_scrimmage/hazmat/hazmat_main.py index eb1542c..ea87f5e 100644 --- a/codes_for_scrimmage/hazmat/hazmat_main.py +++ b/codes_for_scrimmage/hazmat/hazmat_main.py @@ -189,6 +189,7 @@ async def monitor_distance(): """Monitor ultrasonic sensor and stop when wall is detected.""" while True: distance = await lazer_ranger.distance() + print('distancing...',distance) if distance < WALL_DISTANCE: # Stop the drivebase @@ -246,30 +247,29 @@ async def Run2(): #From Heavy_lifting_final.py async def Run3(): #tip the scale.py - drive_base.settings(300,1000,300,200) #Custom drive_base setting based on Ayaan's code - - left_arm.run_angle(500,200) + left_arm.run_angle(600,200) right_arm.run_angle(500,200) await drive_base.straight(70) - await drive_base.turn(-55) + await drive_base.turn(-70) await drive_base.straight(900) - await drive_base.turn(92.5) + await drive_base.turn(115) await drive_base.straight(75) - await drive_base.straight(21) + await drive_base.straight(33) await right_arm.run_angle(500,-250) await right_arm.run_angle(500,250) - await drive_base.turn(55) + await drive_base.turn(66) + await drive_base.straight(7) - await left_arm.run_angle(300,-400) + await left_arm.run_angle(560,-390) #going down + await drive_base.turn(40) # turning right + await left_arm.run_angle(-410,-400) #lift a little bit - await drive_base.turn(46.5) + await drive_base.turn(-46.5) #ma din din din dun await drive_base.turn(-40) await drive_base.straight(900) - drive_base.settings(600,500,300,200) #Reset it to the initial values - async def Run4(): #From Send_Over_Final.py #Get to mission -- 2.49.1 From 249071f5c306dbc7421a5160dc52175649a06a00 Mon Sep 17 00:00:00 2001 From: Rishikesh Lolapu <31lolapr@elmbrookstudents.org> Date: Fri, 24 Oct 2025 00:42:21 +0000 Subject: [PATCH 56/70] Update codes_for_scrimmage/hazmat/mainhazmatUPD.py --- codes_for_scrimmage/hazmat/mainhazmatUPD.py | 22 ++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/codes_for_scrimmage/hazmat/mainhazmatUPD.py b/codes_for_scrimmage/hazmat/mainhazmatUPD.py index a243e83..38c1a00 100644 --- a/codes_for_scrimmage/hazmat/mainhazmatUPD.py +++ b/codes_for_scrimmage/hazmat/mainhazmatUPD.py @@ -132,7 +132,7 @@ async def Run4(): # From Send_Over_Final.py async def Run5(): await drive_base.straight(519) await left_arm.run_angle(-10000, 300) - await left_arm.run_angle(10000, 600) + await left_arm_left.run_angle(10000, 600) await drive_base.straight(160) await drive_base.turn(-30) await drive_base.straight(50) @@ -142,19 +142,23 @@ async def Run5(): await drive_base.straight(25) await right_arm.run_angle(10000, -3000) await drive_base.straight(-100) - await drive_base.turn(-55) + await drive_base.turn(-52) await right_arm.run_angle(10000, -3000) - await drive_base.straight(250) + await drive_base.straight(245) await drive_base.turn(-5) await right_arm.run_angle(10000, 7000) - await drive_base.straight(-50) + await drive_base.straight(-65) await drive_base.turn(45) - await drive_base.straight(100) - await drive_base.turn(37) - await right_arm.run_angle(10000, -6000) - await drive_base.straight(90) - await right_arm.run_angle(3000, 3000) + await drive_base.straight(125) + await drive_base.turn(26) + await right_arm.run_angle(10000, -8000) + await drive_base.straight(50) + await aright_arm.run_angle(10000, 3500) await drive_base.turn(-40) + await drive_base.turn(5) + await drive_base.straight(-300) + await drive_base.turn(-78) + await drive_base.straight(-700) # Add - Adi's code here -- 2.49.1 From 831b75025d6ae24dd97385cc1e48345a193d1f3d Mon Sep 17 00:00:00 2001 From: Rishikesh Lolapu <31lolapr@elmbrookstudents.org> Date: Fri, 24 Oct 2025 00:45:10 +0000 Subject: [PATCH 57/70] Update codes_for_scrimmage/hazmat/mainhazmatUPD.py Minor changes. --- codes_for_scrimmage/hazmat/mainhazmatUPD.py | 27 +++++++++++---------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/codes_for_scrimmage/hazmat/mainhazmatUPD.py b/codes_for_scrimmage/hazmat/mainhazmatUPD.py index 38c1a00..59471a4 100644 --- a/codes_for_scrimmage/hazmat/mainhazmatUPD.py +++ b/codes_for_scrimmage/hazmat/mainhazmatUPD.py @@ -85,28 +85,29 @@ async def Run2(): # From Heavy_lifting_final.py async def Run3(): # tip the scale.py - drive_base.settings(300, 1000, 300, 200) # Custom drive_base setting based on Ayaan's code - - left_arm.run_angle(500, 200) - right_arm.run_angle(500, 200) + left_arm.run_angle(600,200) + right_arm.run_angle(500,200) await drive_base.straight(70) - await drive_base.turn(-55) + await drive_base.turn(-70) await drive_base.straight(900) - await drive_base.turn(92.5) + await drive_base.turn(115) await drive_base.straight(75) - await drive_base.straight(21) - await right_arm.run_angle(500, -250) - await right_arm.run_angle(500, 250) - await drive_base.turn(55) + await drive_base.straight(33) + await right_arm.run_angle(500,-250) + await right_arm.run_angle(500,250) + await drive_base.turn(66) + await drive_base.straight(7) - await left_arm.run_angle(300, -400) + await left_arm.run_angle(560,-390) #going down + print('turning now...') + await drive_base.turn(40) # turning right + await left_arm.run_angle(-410,-400) #lift a little bit - await drive_base.turn(46.5) + await drive_base.turn(-46.5) #ma din din din dun await drive_base.turn(-40) await drive_base.straight(900) - drive_base.settings(600, 500, 300, 200) # Reset it to the initial values async def Run4(): # From Send_Over_Final.py -- 2.49.1 From dbb0749ff366bb7bd08f6c3ee236b4054eeaf19a Mon Sep 17 00:00:00 2001 From: Rishikesh Lolapu <31lolapr@elmbrookstudents.org> Date: Fri, 24 Oct 2025 00:49:24 +0000 Subject: [PATCH 58/70] Update codes_for_scrimmage/hazmat/mainhazmatUPD.py Minor Changes AGAIN!! --- codes_for_scrimmage/hazmat/mainhazmatUPD.py | 22 ++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/codes_for_scrimmage/hazmat/mainhazmatUPD.py b/codes_for_scrimmage/hazmat/mainhazmatUPD.py index 59471a4..bffb210 100644 --- a/codes_for_scrimmage/hazmat/mainhazmatUPD.py +++ b/codes_for_scrimmage/hazmat/mainhazmatUPD.py @@ -111,24 +111,36 @@ async def Run3(): # tip the scale.py async def Run4(): # From Send_Over_Final.py - # Get to mission + #Get to mission await drive_base.straight(920) - await drive_base.turn(-90, Stop.HOLD) + await drive_base.turn(-90,Stop.HOLD) await drive_base.straight(65) - # Solve mission + #Solve mission drive_base.turn(-10) - await left_arm.run_angle(10000, -4000) - # Get to Red Start + await left_arm.run_angle(10000,-4000) + #Get to Red Start await drive_base.straight(-110) await drive_base.turn(90) await drive_base.straight(500) + # while True: + # distance_mm = await lazer_ranger.distance() + # print('distancing...',distance_mm) + + # if distance_mm < 300: + # drive_base.stop + # break + # else: + # drive_base.straight(300) + # print('running...') + # await wait(10) await multitask( drive_forward(), monitor_distance() ) + # Add Rishi's code here async def Run5(): await drive_base.straight(519) -- 2.49.1 From 94bae3c140079cd0818f34c111565a141109233f Mon Sep 17 00:00:00 2001 From: Rishikesh Lolapu <31lolapr@elmbrookstudents.org> Date: Fri, 24 Oct 2025 00:52:40 +0000 Subject: [PATCH 59/70] Update codes_for_scrimmage/hazmat/mainhazmatUPD.py --- codes_for_scrimmage/hazmat/mainhazmatUPD.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/codes_for_scrimmage/hazmat/mainhazmatUPD.py b/codes_for_scrimmage/hazmat/mainhazmatUPD.py index bffb210..20d182e 100644 --- a/codes_for_scrimmage/hazmat/mainhazmatUPD.py +++ b/codes_for_scrimmage/hazmat/mainhazmatUPD.py @@ -45,7 +45,7 @@ async def monitor_distance(): # New Section async def Run1(): # From M8_5.py - left_arm.run_angle(1000, 300) + left_arm.run_angle(1000, -300) right_arm.run_angle(1000, 500) await drive_base.straight(320) await right_arm.run_angle(5000, -500, Stop.HOLD) @@ -63,9 +63,9 @@ async def Run1(): # From M8_5.py await drive_base.straight(-145) await drive_base.turn(-60) await drive_base.straight(90) - await left_arm.run_angle(1000, -450) - await drive_base.straight(-145) await left_arm.run_angle(1000, 450) + await drive_base.straight(-145) + await left_arm.run_angle(1000, -450) await drive_base.straight(10) await drive_base.turn(35) await drive_base.straight(-600) @@ -85,7 +85,7 @@ async def Run2(): # From Heavy_lifting_final.py async def Run3(): # tip the scale.py - left_arm.run_angle(600,200) + left_arm.run_angle(600,-200) right_arm.run_angle(500,200) await drive_base.straight(70) @@ -100,7 +100,7 @@ async def Run3(): # tip the scale.py await drive_base.turn(66) await drive_base.straight(7) - await left_arm.run_angle(560,-390) #going down + await left_arm.run_angle(560,390) #going down print('turning now...') await drive_base.turn(40) # turning right await left_arm.run_angle(-410,-400) #lift a little bit -- 2.49.1 From 3765db30018e1c0e1dd0d47093ad9da6c1ed97bd Mon Sep 17 00:00:00 2001 From: Rishikesh Lolapu <31lolapr@elmbrookstudents.org> Date: Fri, 24 Oct 2025 01:01:04 +0000 Subject: [PATCH 60/70] Update codes_for_scrimmage/hazmat/mainhazmatUPD.py MINOR CHANGES AGAIN --- codes_for_scrimmage/hazmat/mainhazmatUPD.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codes_for_scrimmage/hazmat/mainhazmatUPD.py b/codes_for_scrimmage/hazmat/mainhazmatUPD.py index 20d182e..daa6814 100644 --- a/codes_for_scrimmage/hazmat/mainhazmatUPD.py +++ b/codes_for_scrimmage/hazmat/mainhazmatUPD.py @@ -177,9 +177,9 @@ async def Run5(): # Add - Adi's code here async def Run6(): await drive_base.straight(420) - await right_arm.run_angle(300, -100) - await drive_base.straight(-100) await right_arm.run_angle(300, 100) + await drive_base.straight(-100) + await right_arm.run_angle(300,-100) await drive_base.straight(-350) -- 2.49.1 From b41f833c5ece709de71adeae5006f85b8897c560 Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Fri, 24 Oct 2025 01:07:23 +0000 Subject: [PATCH 61/70] Update codes_for_scrimmage/hazmat/mainhazmatUPD.py --- codes_for_scrimmage/hazmat/mainhazmatUPD.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/codes_for_scrimmage/hazmat/mainhazmatUPD.py b/codes_for_scrimmage/hazmat/mainhazmatUPD.py index daa6814..af312ee 100644 --- a/codes_for_scrimmage/hazmat/mainhazmatUPD.py +++ b/codes_for_scrimmage/hazmat/mainhazmatUPD.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 = 200 # mm +WALL_DISTANCE = 300 # mm async def drive_forward(): """Drive forward continuously using DriveBase.""" @@ -32,11 +32,11 @@ async def monitor_distance(): """Monitor ultrasonic sensor and stop when wall is detected.""" while True: distance = lazer_ranger.distance() + print('Distancing...',distance) if distance < WALL_DISTANCE: # Stop the drivebase - await drive_base.turn(-180) - drive_base.brake() + await drive_base.stop print(f"Wall detected at {distance}mm!") break @@ -117,7 +117,7 @@ async def Run4(): # From Send_Over_Final.py await drive_base.straight(65) #Solve mission drive_base.turn(-10) - await left_arm.run_angle(10000,-4000) + await left_arm.run_angle(10000, 4000) #Get to Red Start await drive_base.straight(-110) await drive_base.turn(90) -- 2.49.1 From 5427c73f1cc169acc2a04541df73e2da0a8c5f7c Mon Sep 17 00:00:00 2001 From: Rishikesh Lolapu <31lolapr@elmbrookstudents.org> Date: Fri, 24 Oct 2025 01:09:49 +0000 Subject: [PATCH 62/70] Update codes_for_scrimmage/hazmat/mainhazmatUPD.py I am not a monkey --- codes_for_scrimmage/hazmat/mainhazmatUPD.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/codes_for_scrimmage/hazmat/mainhazmatUPD.py b/codes_for_scrimmage/hazmat/mainhazmatUPD.py index af312ee..55e9945 100644 --- a/codes_for_scrimmage/hazmat/mainhazmatUPD.py +++ b/codes_for_scrimmage/hazmat/mainhazmatUPD.py @@ -176,11 +176,8 @@ async def Run5(): # Add - Adi's code here async def Run6(): - await drive_base.straight(420) - await right_arm.run_angle(300, 100) - await drive_base.straight(-100) - await right_arm.run_angle(300,-100) - await drive_base.straight(-350) + await drive_base.straight(750) + await drive_base.straight(-650) # Function to classify color based on HSV -- 2.49.1 From 702e05e7f771e6e721bb71acf1c6346f5d7fc437 Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Fri, 24 Oct 2025 01:13:45 +0000 Subject: [PATCH 63/70] Update codes_for_scrimmage/hazmat/mainhazmatUPD.py --- codes_for_scrimmage/hazmat/mainhazmatUPD.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codes_for_scrimmage/hazmat/mainhazmatUPD.py b/codes_for_scrimmage/hazmat/mainhazmatUPD.py index 55e9945..647f370 100644 --- a/codes_for_scrimmage/hazmat/mainhazmatUPD.py +++ b/codes_for_scrimmage/hazmat/mainhazmatUPD.py @@ -31,7 +31,7 @@ async def drive_forward(): async def monitor_distance(): """Monitor ultrasonic sensor and stop when wall is detected.""" while True: - distance = lazer_ranger.distance() + distance = await lazer_ranger.distance() print('Distancing...',distance) if distance < WALL_DISTANCE: -- 2.49.1 From 9d3d8b48e46acee052be00e8dc457563f83a24d4 Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Fri, 24 Oct 2025 01:15:43 +0000 Subject: [PATCH 64/70] Update codes_for_scrimmage/hazmat/mainhazmatUPD.py --- codes_for_scrimmage/hazmat/mainhazmatUPD.py | 1 - 1 file changed, 1 deletion(-) diff --git a/codes_for_scrimmage/hazmat/mainhazmatUPD.py b/codes_for_scrimmage/hazmat/mainhazmatUPD.py index 647f370..6f05d42 100644 --- a/codes_for_scrimmage/hazmat/mainhazmatUPD.py +++ b/codes_for_scrimmage/hazmat/mainhazmatUPD.py @@ -121,7 +121,6 @@ async def Run4(): # From Send_Over_Final.py #Get to Red Start await drive_base.straight(-110) await drive_base.turn(90) - await drive_base.straight(500) # while True: # distance_mm = await lazer_ranger.distance() -- 2.49.1 From 54e8c9eba5f9374ee5284d077e5d6d340a55c4e3 Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Fri, 24 Oct 2025 01:16:19 +0000 Subject: [PATCH 65/70] Update codes_for_scrimmage/hazmat/mainhazmatUPD.py --- codes_for_scrimmage/hazmat/mainhazmatUPD.py | 1 - 1 file changed, 1 deletion(-) diff --git a/codes_for_scrimmage/hazmat/mainhazmatUPD.py b/codes_for_scrimmage/hazmat/mainhazmatUPD.py index 6f05d42..eed6bef 100644 --- a/codes_for_scrimmage/hazmat/mainhazmatUPD.py +++ b/codes_for_scrimmage/hazmat/mainhazmatUPD.py @@ -121,7 +121,6 @@ async def Run4(): # From Send_Over_Final.py #Get to Red Start await drive_base.straight(-110) await drive_base.turn(90) - # while True: # distance_mm = await lazer_ranger.distance() # print('distancing...',distance_mm) -- 2.49.1 From 1317c8e8cef7384d7eecdbfe7725b283bb28fde3 Mon Sep 17 00:00:00 2001 From: Rishikesh Lolapu <31lolapr@elmbrookstudents.org> Date: Sat, 25 Oct 2025 01:15:49 +0000 Subject: [PATCH 66/70] Update codes_for_scrimmage/hazmat/mainhazmatUPD.py Minor Changes --- codes_for_scrimmage/hazmat/mainhazmatUPD.py | 27 ++++++++++----------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/codes_for_scrimmage/hazmat/mainhazmatUPD.py b/codes_for_scrimmage/hazmat/mainhazmatUPD.py index eed6bef..4b98dc0 100644 --- a/codes_for_scrimmage/hazmat/mainhazmatUPD.py +++ b/codes_for_scrimmage/hazmat/mainhazmatUPD.py @@ -143,32 +143,31 @@ async def Run4(): # From Send_Over_Final.py async def Run5(): await drive_base.straight(519) await left_arm.run_angle(-10000, 300) - await left_arm_left.run_angle(10000, 600) + await left_arm.run_angle(10000, 600) await drive_base.straight(160) await drive_base.turn(-30) await drive_base.straight(50) await right_arm.run_angle(3000, 3000) await drive_base.straight(-150) - await drive_base.turn(135) + await drive_base.turn(120) await drive_base.straight(25) await right_arm.run_angle(10000, -3000) - await drive_base.straight(-100) - await drive_base.turn(-52) + await drive_base.straight(-110) + await drive_base.turn(-43) await right_arm.run_angle(10000, -3000) - await drive_base.straight(245) - await drive_base.turn(-5) - await right_arm.run_angle(10000, 7000) + await drive_base.straight(295) + await right_arm.run_angle(10000, 9000) await drive_base.straight(-65) await drive_base.turn(45) - await drive_base.straight(125) + await drive_base.straight(175) await drive_base.turn(26) - await right_arm.run_angle(10000, -8000) - await drive_base.straight(50) - await aright_arm.run_angle(10000, 3500) - await drive_base.turn(-40) - await drive_base.turn(5) + await drive_base.straight(-100) + await right_arm.run_angle(10000, -9000) + await drive_base.straight(100) + await right_arm.run_angle(10000, 3500) + await drive_base.turn(-30) await drive_base.straight(-300) - await drive_base.turn(-78) + await drive_base.turn(-80) await drive_base.straight(-700) -- 2.49.1 From 4d1bd8abe36cd82d019ed90c0cb2da2df2373f8b Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Sat, 25 Oct 2025 01:26:41 +0000 Subject: [PATCH 67/70] Update codes_for_scrimmage/hazmat/mainhazmatUPD.py --- codes_for_scrimmage/hazmat/mainhazmatUPD.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codes_for_scrimmage/hazmat/mainhazmatUPD.py b/codes_for_scrimmage/hazmat/mainhazmatUPD.py index 4b98dc0..257c9f8 100644 --- a/codes_for_scrimmage/hazmat/mainhazmatUPD.py +++ b/codes_for_scrimmage/hazmat/mainhazmatUPD.py @@ -105,7 +105,7 @@ async def Run3(): # tip the scale.py await drive_base.turn(40) # turning right await left_arm.run_angle(-410,-400) #lift a little bit - await drive_base.turn(-46.5) #ma din din din dun + await drive_base.turn(46.5) #ma din din din dun await drive_base.turn(-40) await drive_base.straight(900) -- 2.49.1 From 9a320589ab74255891852c935be71cfb3dd66dd5 Mon Sep 17 00:00:00 2001 From: Johannes <31liwaj@elmbrookstudents.org> Date: Sat, 25 Oct 2025 01:38:57 +0000 Subject: [PATCH 68/70] Update codes_for_scrimmage/hazmat/mainhazmatUPD.py 67 --- codes_for_scrimmage/hazmat/mainhazmatUPD.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/codes_for_scrimmage/hazmat/mainhazmatUPD.py b/codes_for_scrimmage/hazmat/mainhazmatUPD.py index 257c9f8..7ad8fba 100644 --- a/codes_for_scrimmage/hazmat/mainhazmatUPD.py +++ b/codes_for_scrimmage/hazmat/mainhazmatUPD.py @@ -103,10 +103,9 @@ async def Run3(): # tip the scale.py await left_arm.run_angle(560,390) #going down print('turning now...') await drive_base.turn(40) # turning right - await left_arm.run_angle(-410,-400) #lift a little bit - - await drive_base.turn(46.5) #ma din din din dun - await drive_base.turn(-40) + await left_arm.run_angle(410,-400) #lift a little bit + await drive_base.straight(80) + await drive_base.turn(-41) #ma din din din dun 67 41 21 69 await drive_base.straight(900) -- 2.49.1 From 7b539b45d006e21819744996a7be8d53454c8ccf Mon Sep 17 00:00:00 2001 From: Rishikesh Lolapu <31lolapr@elmbrookstudents.org> Date: Sat, 25 Oct 2025 02:05:16 +0000 Subject: [PATCH 69/70] Update codes_for_scrimmage/hazmat/mainhazmatUPD.py CVC --- codes_for_scrimmage/hazmat/mainhazmatUPD.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codes_for_scrimmage/hazmat/mainhazmatUPD.py b/codes_for_scrimmage/hazmat/mainhazmatUPD.py index 7ad8fba..c48de0b 100644 --- a/codes_for_scrimmage/hazmat/mainhazmatUPD.py +++ b/codes_for_scrimmage/hazmat/mainhazmatUPD.py @@ -159,9 +159,9 @@ async def Run5(): await drive_base.straight(-65) await drive_base.turn(45) await drive_base.straight(175) - await drive_base.turn(26) + await drive_base.turn(24.5) await drive_base.straight(-100) - await right_arm.run_angle(10000, -9000) + await right_arm.run_angle(10000, -8500) await drive_base.straight(100) await right_arm.run_angle(10000, 3500) await drive_base.turn(-30) -- 2.49.1 From ef0ff44f2be6ebde4d52c094ad9a410200d295ef Mon Sep 17 00:00:00 2001 From: Rishikesh Lolapu <31lolapr@elmbrookstudents.org> Date: Sat, 25 Oct 2025 02:06:49 +0000 Subject: [PATCH 70/70] HazmatCodeChanges This is the code we changed at the scrimmage. --- .../hazmat/HazmatCodeChanges.py | 227 ++++++++++++++++++ 1 file changed, 227 insertions(+) create mode 100644 codes_for_scrimmage/hazmat/HazmatCodeChanges.py diff --git a/codes_for_scrimmage/hazmat/HazmatCodeChanges.py b/codes_for_scrimmage/hazmat/HazmatCodeChanges.py new file mode 100644 index 0000000..c48de0b --- /dev/null +++ b/codes_for_scrimmage/hazmat/HazmatCodeChanges.py @@ -0,0 +1,227 @@ +from pybricks.pupdevices import Motor, ColorSensor, UltrasonicSensor, ForceSensor +from pybricks.parameters import Button, Color, Direction, Port, Side, Stop +from pybricks.tools import run_task, multitask +from pybricks.tools import wait, StopWatch +from pybricks.robotics import DriveBase +from pybricks.hubs import PrimeHub + +# Initialize hub and devices +hub = PrimeHub() +left_motor = Motor(Port.A, Direction.COUNTERCLOCKWISE) +right_motor = Motor(Port.B) +left_arm = Motor(Port.C) +right_arm = Motor(Port.D) +lazer_ranger = UltrasonicSensor(Port.E) +color_sensor = ColorSensor(Port.F) + +# DriveBase configuration +WHEEL_DIAMETER = 68.8 # mm (adjust for your wheels) +AXLE_TRACK = 180 # mm (distance between wheels) +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 + +async def drive_forward(): + """Drive forward continuously using DriveBase.""" + drive_base.drive(400, 0) + + +async def monitor_distance(): + """Monitor ultrasonic sensor and stop when wall is detected.""" + while True: + distance = await lazer_ranger.distance() + print('Distancing...',distance) + + if distance < WALL_DISTANCE: + # Stop the drivebase + await drive_base.stop + print(f"Wall detected at {distance}mm!") + break + + # Small delay to prevent overwhelming the sensor + await wait(50) + +# New Section +async def Run1(): # From M8_5.py + left_arm.run_angle(1000, -300) + right_arm.run_angle(1000, 500) + await drive_base.straight(320) + await right_arm.run_angle(5000, -500, Stop.HOLD) + await right_arm.run_angle(5000, 500, Stop.HOLD) + await right_arm.run_angle(5000, -500, Stop.HOLD) + await right_arm.run_angle(5000, 500, Stop.HOLD) + await right_arm.run_angle(5000, -500, Stop.HOLD) + await drive_base.turn(-20) + await drive_base.straight(277) + await drive_base.turn(20) + await drive_base.straight(65) + await drive_base.turn(-30) + right_arm.run_angle(50, 500) + await drive_base.turn(45) + await drive_base.straight(-145) + await drive_base.turn(-60) + await drive_base.straight(90) + await left_arm.run_angle(1000, 450) + await drive_base.straight(-145) + await left_arm.run_angle(1000, -450) + await drive_base.straight(10) + await drive_base.turn(35) + await drive_base.straight(-600) + +async def Run2(): # From Heavy_lifting_final.py + await drive_base.straight(200) + await drive_base.turn(-20) + await drive_base.straight(536) + await drive_base.turn(60, Stop.HOLD) + await drive_base.straight(30) + await right_arm.run_angle(5000, 2900) + await drive_base.straight(40) + await right_arm.run_angle(5000, -4000) + await drive_base.straight(-60) + await drive_base.turn(-60) + await drive_base.straight(-670) + + +async def Run3(): # tip the scale.py + left_arm.run_angle(600,-200) + right_arm.run_angle(500,200) + await drive_base.straight(70) + + await drive_base.turn(-70) + await drive_base.straight(900) + await drive_base.turn(115) + + await drive_base.straight(75) + await drive_base.straight(33) + await right_arm.run_angle(500,-250) + await right_arm.run_angle(500,250) + await drive_base.turn(66) + await drive_base.straight(7) + + await left_arm.run_angle(560,390) #going down + print('turning now...') + await drive_base.turn(40) # turning right + await left_arm.run_angle(410,-400) #lift a little bit + await drive_base.straight(80) + await drive_base.turn(-41) #ma din din din dun 67 41 21 69 + await drive_base.straight(900) + + +async def Run4(): # From Send_Over_Final.py + #Get to mission + await drive_base.straight(920) + await drive_base.turn(-90,Stop.HOLD) + await drive_base.straight(65) + #Solve mission + drive_base.turn(-10) + await left_arm.run_angle(10000, 4000) + #Get to Red Start + await drive_base.straight(-110) + await drive_base.turn(90) + # while True: + # distance_mm = await lazer_ranger.distance() + # print('distancing...',distance_mm) + + # if distance_mm < 300: + # drive_base.stop + # break + # else: + # drive_base.straight(300) + # print('running...') + # await wait(10) + await multitask( + drive_forward(), + monitor_distance() + ) + + + +# Add Rishi's code here +async def Run5(): + await drive_base.straight(519) + await left_arm.run_angle(-10000, 300) + await left_arm.run_angle(10000, 600) + await drive_base.straight(160) + await drive_base.turn(-30) + await drive_base.straight(50) + await right_arm.run_angle(3000, 3000) + await drive_base.straight(-150) + await drive_base.turn(120) + await drive_base.straight(25) + await right_arm.run_angle(10000, -3000) + await drive_base.straight(-110) + await drive_base.turn(-43) + await right_arm.run_angle(10000, -3000) + await drive_base.straight(295) + await right_arm.run_angle(10000, 9000) + await drive_base.straight(-65) + await drive_base.turn(45) + await drive_base.straight(175) + await drive_base.turn(24.5) + await drive_base.straight(-100) + await right_arm.run_angle(10000, -8500) + await drive_base.straight(100) + await right_arm.run_angle(10000, 3500) + await drive_base.turn(-30) + await drive_base.straight(-300) + await drive_base.turn(-80) + await drive_base.straight(-700) + + +# Add - Adi's code here +async def Run6(): + await drive_base.straight(750) + await drive_base.straight(-650) + + +# Function to classify color based on HSV +def detect_color(h, s, v, reflected): + if reflected > 4: + if h < 4 or h > 350: # red + return "Red" + elif 3 < h < 40 and s > 70: # orange + return "Orange" + elif 47 < h < 56: # yellow + return "Yellow" + elif 70 < h < 160: # green - do it vertically not horizontally for accuracy + return "Green" + elif 210 < h < 225: # blue - do it vertically not horizontally for accuracy + return "Blue" + elif 260 < h < 350: # purple + return "Purple" + else: + return "Unknown" + return "Unknown" + + +async def main(): + while True: + h, s, v = await color_sensor.hsv() + reflected = await color_sensor.reflection() + color = detect_color(h, s, v, reflected) + + if color == "Red": + print('Running Mission 3') + await Run3() #red + elif color == "Orange": + print('Running Mission 6') + await Run6() #orange + elif color == "Yellow": + print('Running Mission 4') + await Run4() #yellow + elif color == "Green": + print('Running Mission 1') + await Run1() #green - vertically + elif color == "Blue": + print('Running Mission 5') + await Run5() #blue - vertically + elif color == "Purple": + print('Running Mission 2') + await Run2() #purple - vertically + 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 -- 2.49.1