diff --git a/leds.py b/leds.py index 327c011..d0d1f44 100644 --- a/leds.py +++ b/leds.py @@ -53,7 +53,7 @@ class Adafruit_CharLCD: LCD_5x10DOTS = 0x04 LCD_5x8DOTS = 0x00 - def __init__(self, pin_rs=24, pin_e=23, pin_b=04, pins_db=[17, 18, 27, 22], GPIO=None): + def __init__(self, pin_rs=24, pin_e=23, pin_b=4, pins_db=[17, 25, 27, 22], pin_rgb=18, GPIO=None): # Emulate the old behavior of using RPi.GPIO if we haven't been given # an explicit GPIO interface to use if not GPIO: @@ -74,7 +74,7 @@ class Adafruit_CharLCD: self.GPIO.setup(pin, GPIO.OUT) self.GPIO.output(self.pin_b, True) - + self.write4bits(0x33) # initialization self.write4bits(0x32) # initialization self.write4bits(0x28) # 2 line 5x7 matrix @@ -276,7 +276,7 @@ def querycolor(): def loop(): lcd = Adafruit_CharLCD() level = 0 - level_max = 15 + level_max = 14 idle = 0 idle_max = 15 cur_color = "ffffff" diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..2b944ca --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +rpi_ws281x==4.2.5 \ No newline at end of file