From e4ae2c6939b17d2922163c0458e2335ea621d6a7 Mon Sep 17 00:00:00 2001
From: Adam Blank <blank@caltech.edu>
Date: Wed, 16 Oct 2024 15:59:27 +0000
Subject: [PATCH] autocommit

---
 07/interact.py | 21 +--------------------
 1 file changed, 1 insertion(+), 20 deletions(-)

diff --git a/07/interact.py b/07/interact.py
index bfee17f..17632d6 100644
--- a/07/interact.py
+++ b/07/interact.py
@@ -9,24 +9,5 @@ BLUE: tuple[int, int, int] = (0, 0, 255)
 
 
 def run(apds: ProximitySensor, pixels: LEDController, touch: TouchSensor):
-    led_is_on: bool = False
-
-    hue = 0
     while True:
-        if led_is_on:
-            r, g, b = colorsys.hsv_to_rgb(hue, 1, 1)
-            pixels.fill((int(r*255), int(g*255), int(b*255)))
-
-            hue += 0.01
-            if hue >= 1:
-                hue = 0
-
-            print(apds.proximity)
-            time.sleep(apds.proximity / 255)
-        else:
-            pixels.fill((0, 0, 0))
-
-        if touch.value:
-            led_is_on = not led_is_on
-            print("touch.")
-            time.sleep(1)
+        pixels.fill((BLUE))
-- 
GitLab