Update diagnostics/ColorSensorDiagnostics.py

This commit is contained in:
2025-12-18 17:14:13 +00:00
parent 4473d794bd
commit 5b9ab7daed

View File

@@ -41,6 +41,7 @@ class ColorSensorDiagnostics:
self.colorsensor.detectable_colors(Color.RED, Color.YELLOW, Color.GREEN, Color.BLUE, Color.WHITE, Color.NONE) self.colorsensor.detectable_colors(Color.RED, Color.YELLOW, Color.GREEN, Color.BLUE, Color.WHITE, Color.NONE)
def printAll(self): def printAll(self):
self.initializeColorSensor() self.initializeColorSensor()
while True: stopwatch = StopWatch()
while stopwatch.time < 5000:
print("HSV output:", self.colorsensor.hsv) print("HSV output:", self.colorsensor.hsv)
print("Detected color:", self.colorsensor.color()) print("Detected color:", self.colorsensor.color())