From c909dcd86787fbcf9effa62a9e83f60459345e1d Mon Sep 17 00:00:00 2001 From: "michael.divia" <michael.divia@etu.hesge.ch> Date: Tue, 18 Jun 2024 09:17:05 +0200 Subject: [PATCH] Forgot Good Matrix on the card --- 1 - Code/hl3.py | 9 +++++---- 1 - Code/main.py | 3 +-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/1 - Code/hl3.py b/1 - Code/hl3.py index e9ce3b4..90aeee4 100644 --- a/1 - Code/hl3.py +++ b/1 - Code/hl3.py @@ -1,5 +1,5 @@ from machine import Pin -from neopixel import NeoPixel +from neopixel import NeoPixel class color: BLACK = (0, 0, 0) @@ -10,10 +10,11 @@ class color: RED = (255, 0, 0) def init_neopixel(): - return NeoPixel(Pin(0, Pin.OUT), 64) + return NeoPixel(Pin(0, Pin.OUT), 64) class matrix: - def clear(self, color): + def clear(color): np = init_neopixel() - for i in range(0,64): + for i in range(64): np[i] = color + np.write() \ No newline at end of file diff --git a/1 - Code/main.py b/1 - Code/main.py index 1d2ef82..c9e354a 100644 --- a/1 - Code/main.py +++ b/1 - Code/main.py @@ -1,5 +1,4 @@ from hl3 import color from hl3 import matrix -while True: - matrix.clear(color.RED) +matrix.clear(color.RED) \ No newline at end of file -- GitLab