From 4be5625dd56ed1204bfa806b598c809992628968 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Thu, 10 Nov 2022 22:28:12 +0700 Subject: [PATCH] adjust led data pin --- kuukar/kuukar_collision.py | 1 - kuukar/kuukar_config.py | 8 ++++---- kuukar/kuukar_leds.py | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/kuukar/kuukar_collision.py b/kuukar/kuukar_collision.py index 512cd8e..3a423eb 100644 --- a/kuukar/kuukar_collision.py +++ b/kuukar/kuukar_collision.py @@ -14,5 +14,4 @@ class collision: def collision_handle(self, data): val = data[2] if val == 1: - #self.leds.__flasher(r=255, g=0, b=0, duration=250) self.lcd.play_video("keke_hurt") \ No newline at end of file diff --git a/kuukar/kuukar_config.py b/kuukar/kuukar_config.py index 19c9b87..d462921 100644 --- a/kuukar/kuukar_config.py +++ b/kuukar/kuukar_config.py @@ -28,11 +28,11 @@ COLLISION_DETECTOR_PIN = 16 COLLISION_ENABLE = True LEDS_DATA_PIN = 17 -LEDS_NUM = 15 +LEDS_NUM = 16 HEADLIGHT_LEDS = [5, 10] -LEFT_SIGNAL_LEDS = [6, 3] -RIGHT_SIGNAL_LEDS = [7, 4] -REVERSE_LEDS = [1, 2] +LEFT_SIGNAL_LEDS = [4, 5, 6, 7] +RIGHT_SIGNAL_LEDS = [0, 1, 14, 15] +REVERSE_LEDS = [11, 10, 9] LIGHT_ANALOG_PIN = 2 diff --git a/kuukar/kuukar_leds.py b/kuukar/kuukar_leds.py index e819a12..5cbe2e9 100644 --- a/kuukar/kuukar_leds.py +++ b/kuukar/kuukar_leds.py @@ -38,7 +38,7 @@ class leds: self.__update_leds() def set_reverse_led(self, state: bool): - self.reverse_signal = True + self.reverse_signal = state self.__update_leds() def __update_leds(self):