adjust led data pin

This commit is contained in:
Siwat Sirichai 2022-11-10 22:28:12 +07:00
parent 3b5265fcd0
commit 4be5625dd5
3 changed files with 5 additions and 6 deletions

View File

@ -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")

View File

@ -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

View File

@ -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):