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] 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: