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/15] 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 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/15] 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 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/15] 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 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/15] 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 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/15] 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 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/15] 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 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 07/15] 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 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 08/15] 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 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 09/15] 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 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 10/15] 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 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 11/15] 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 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 12/15] 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) 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 13/15] 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) 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 14/15] 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 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 15/15] 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