Compare commits

..

13 Commits

2 changed files with 43 additions and 27 deletions

View File

@@ -63,17 +63,14 @@ Repository
### Installation & Deployment - from the server - everyday ### Installation & Deployment - from the server - everyday
1. Download the file codes_for_scrimmage/regional-final/Final_combined.py 1. Download the file competition_codes/sectionals/sectional_main_dec_6.py
- You can do this through the repo, by using cURL, or by using git. - You can do this through the repo, by using cURL, or by using git.
- Repo - Go to [codes_for_scrimmage/regional-final/Final_combined.py](codes_for_scrimmage/regional-final/Final_combined.py) and click the "Download" button. - Repo - Go to the [latest release](https://codes.fll-65266.org/FLL_65266_LEGO_DYNAMICS/solutions_season_unearthed/releases) and click the "Download as ZIP" button to get the full repository.
- cURL or another HTTP data transferrer - - Single file - Go to the latest release and click the file link to get the raw master file.
```curl -o Final_combined.py https://codes.fll-65266.org/FLL_65266_LEGO_DYNAMICS/solutions_season_unearthed/raw/branch/main/codes_for_scrimmage/regional-final/Final_combined.py```
- git CLI - - git CLI -
```git clone https://codes.fll-65266.org/FLL_65266_LEGO_DYNAMICS/solutions_season_unearthed.git```
```git clone -b dev https://codes.fll-65266.org/FLL_65266_LEGO_DYNAMICS/solutions_season_unearthed.git && cd solutions_season_unearthed/codes_for_scrimmage/regional-final``` Then use the master file.
Then use Final_combined.py.
2. Open https://code.pybricks.com/ and select the "Import a file" button on the top of the left bar. Import the .py file. Pair your robot via Bluetooth in Pybricks by selecting the Bluetooth button. 2. Open https://code.pybricks.com/ and select the "Import a file" button on the top of the left bar. Import the .py file. Pair your robot via Bluetooth in Pybricks by selecting the Bluetooth button.

View File

@@ -123,10 +123,10 @@ async def solve_forge():
await drive_base.straight(-47) await drive_base.straight(-47)
async def solve_heavy_lifting(): async def solve_heavy_lifting():
await right_arm.run_angle(500,-90) # arm down await right_arm.run_angle(500,-160) # arm down
await wait(100) await wait(100)
await drive_base.turn(20) # turn right a little bit await drive_base.turn(20) # turn right a little bit
await right_arm.run_angle(500,140) #arm up await right_arm.run_angle(500,160) #arm up
await drive_base.turn(-20) #reset position await drive_base.turn(-20) #reset position
async def solve_who_lived_here(): async def solve_who_lived_here():
@@ -176,9 +176,8 @@ async def Run3():
monitor_distance() monitor_distance()
) )
async def solve_angler_artifacts(): async def solve_angler_artifacts():
await drive_base.straight(920) await drive_base.straight(940)
await drive_base.turn(-90,Stop.HOLD) await drive_base.turn(-90,Stop.HOLD)
await drive_base.straight(65) await drive_base.straight(65)
#Solve #Solve
@@ -187,20 +186,25 @@ async def solve_angler_artifacts():
await drive_base.straight(-110) await drive_base.straight(-110)
await drive_base.turn(90) await drive_base.turn(90)
await drive_base.arc(-150,-100, None) await drive_base.arc(-150,-103, None)
async def solve_tip_the_scale(): async def solve_tip_the_scale():
await drive_base.straight(135) await drive_base.turn(3)
await drive_base.straight(142.5)
await right_arm.run_angle(800,-150) await right_arm.run_angle(800,-150)
await right_arm.run_angle(900,150) await right_arm.run_angle(900,150)
await drive_base.straight(-100) await drive_base.straight(-100)
await drive_base.turn(-65) await drive_base.turn(-65)
await drive_base.straight(320,Stop.COAST_SMART) await drive_base.straight(300,Stop.COAST_SMART)
await drive_base.arc(10,-47, None) await drive_base.arc(10,-47, None)
#await drive_base.turn(-23, Stop.COAST_SMART) #await drive_base.turn(-23, Stop.COAST_SMART)
""" """
Run #4 Run #4
- Solves the Mineshaft explorer + 2/3 Surface Brush + 1/3 Map Reveal - Solves the Mineshaft explorer + 2/3 Surface Brush + 1/3 Map Reveal
@@ -216,7 +220,11 @@ async def Run4():
await right_arm.run_angle(400, -200) await right_arm.run_angle(400, -200)
await drive_base.straight(90) await drive_base.straight(90)
await right_arm.run_angle(100, 95) await right_arm.run_angle(100, 95)
await drive_base.straight(-875) #await drive_base.straight(-875)
#return with arc
await drive_base.straight(-600)
await drive_base.arc(10,-47, None)
await drive_base.straight(-400,Stop.COAST_SMART)
async def solve_brush_reveal(): async def solve_brush_reveal():
await drive_base.straight(700) await drive_base.straight(700)
@@ -236,7 +244,7 @@ Run#5
- Solves Salvage Operation + Statue Rebuild - Solves Salvage Operation + Statue Rebuild
- Orange Key - Orange Key
""" """
async def Run6(): async def Run5():
await drive_base.straight(550) await drive_base.straight(550)
await right_arm.run_angle(300,100) await right_arm.run_angle(300,100)
await drive_base.straight(-75) await drive_base.straight(-75)
@@ -244,16 +252,20 @@ async def Run6():
await drive_base.straight(300) await drive_base.straight(300)
await drive_base.straight(-200) await drive_base.straight(-200)
await drive_base.turn(-15) await drive_base.turn(-15)
#solving statue
await drive_base.straight(350) await drive_base.straight(350)
await drive_base.turn(-103) await drive_base.turn(-104)
await drive_base.straight(-80) await drive_base.straight(-80)
await left_arm.run_angle(500, -900) await left_arm.run_angle(500, -900)
await drive_base.straight(105) await drive_base.straight(120)
await left_arm.run_angle(700, 285) await drive_base.turn(5)
await drive_base.turn(30) await left_arm.run_angle(500, 290)
await drive_base.straight(-60) await drive_base.turn(18)
await drive_base.turn(80) await drive_base.straight(-100)
await drive_base.straight(-900) await drive_base.turn(-90)
await drive_base.straight(900)
drive_base.stop()
async def solve_salvage_operation(): async def solve_salvage_operation():
await drive_base.straight(500) await drive_base.straight(500)
@@ -283,8 +295,15 @@ Run#6
- Purple Key - Purple Key
""" """
async def Run6_7(): # experiment with ferris wheel for Site Markings async def Run6_7(): # experiment with ferris wheel for Site Markings
solve_site_mark_1() #solve_site_mark_1()
solve_site_mark_2() #solve_site_mark_2()
await drive_base.straight(640)
await drive_base.straight(-150)
await drive_base.turn(-8)
await left_arm.run_angle(500, -520)
await drive_base.straight(300)
await wait(50)
await left_arm.run_angle(500, 700)
#return to base #return to base
await drive_base.straight(-300) await drive_base.straight(-300)
drive_base.stop() drive_base.stop()
@@ -352,7 +371,7 @@ async def main():
print('Running Mission 5') print('Running Mission 5')
await Run5() await Run5()
elif color == "Purple": elif color == "Purple":
print('Running Mission 6') print('Running Mission 6_7')
await Run6_7() await Run6_7()
elif color == "Light_Blue": elif color == "Light_Blue":
print("Running Mission 2_1") print("Running Mission 2_1")