@@ -687,78 +687,3 @@ def color(self, color):
687
687
# 0 (on) to pin for any value greater than 0, or 1 (off) for 0:
688
688
pin .value = 0 if color [number ] > 0 else 1
689
689
690
-
691
- class Character_LCD_I2C (Character_LCD ):
692
- """Character LCD connected to I2C/SPI backpack using its I2C connection.
693
- This is a subclass of Character_LCD and implements all of the same
694
- functions and functionality.
695
-
696
- To use, import and initialise as follows:
697
-
698
- .. code-block:: python
699
-
700
- import board
701
- import busio
702
- import adafruit_character_lcd.character_lcd_mono as character_lcd
703
-
704
- i2c = busio.I2C(board.SCL, board.SDA)
705
- lcd = character_lcd.Character_LCD_I2C(i2c, 16, 2)
706
- """
707
- def __init__ (self , i2c , columns , lines , backlight_inverted = False ):
708
- """Initialize character LCD connectedto backpack using I2C connection
709
- on the specified I2C bus with the specified number of columns and
710
- lines on the display. Optionally specify if backlight is inverted.
711
- """
712
- import adafruit_mcp230xx
713
- self ._mcp = adafruit_mcp230xx .MCP23008 (i2c )
714
- reset = self ._mcp .get_pin (1 )
715
- enable = self ._mcp .get_pin (2 )
716
- db4 = self ._mcp .get_pin (3 )
717
- db5 = self ._mcp .get_pin (4 )
718
- db6 = self ._mcp .get_pin (5 )
719
- db7 = self ._mcp .get_pin (6 )
720
- backlight_pin = self ._mcp .get_pin (7 )
721
- self .backlight_inverted = backlight_inverted
722
- super ().__init__ (reset , enable , db4 , db5 , db6 , db7 , columns , lines ,
723
- backlight_pin = backlight_pin , backlight_inverted = backlight_inverted )
724
-
725
-
726
- class Character_LCD_SPI (Character_LCD ):
727
- """Character LCD connected to I2C/SPI backpack using its SPI connection.
728
- This is a subclass of Character_LCD and implements all of the same
729
- functions and functionality.
730
-
731
- To use, import and initialise as follows:
732
-
733
- .. code-block:: python
734
-
735
- import board
736
- import busio
737
- import digitalio
738
- import adafruit_character_lcd.character_lcd_mono as character_lcd
739
-
740
- spi = busio.SPI(board.SCK, MOSI=board.MOSI)
741
- latch = digitalio.DigitalInOut(board.D5)
742
- lcd = character_lcd.Character_LCD_SPI(spi, latch, 16, 2)
743
- """
744
-
745
- def __init__ (self , spi , latch , columns , lines , backlight_inverted = False ):
746
- # pylint: disable=too-many-arguments
747
- """Initialize character LCD connected to backpack using SPI connection
748
- on the specified SPI bus and latch line with the specified number of
749
- columns and lines on the display. Optionally specify if backlight is
750
- inverted.
751
- """
752
- # pylint: enable=too-many-arguments
753
- import adafruit_74hc595
754
- self ._shift_register = adafruit_74hc595 .ShiftRegister74HC595 (spi , latch )
755
- reset = self ._shift_register .get_pin (1 )
756
- enable = self ._shift_register .get_pin (2 )
757
- db4 = self ._shift_register .get_pin (6 )
758
- db5 = self ._shift_register .get_pin (5 )
759
- db6 = self ._shift_register .get_pin (4 )
760
- db7 = self ._shift_register .get_pin (3 )
761
- backlight_pin = self ._shift_register .get_pin (7 )
762
- self .backlight_inverted = backlight_inverted
763
- super ().__init__ (reset , enable , db4 , db5 , db6 , db7 , columns , lines ,
764
- backlight_pin = backlight_pin , backlight_inverted = backlight_inverted )
0 commit comments