mirror of
https://github.com/pimoroni/st7735-python.git
synced 2025-01-05 22:40:25 +03:00
Updated examples to use front backlight pin
This commit is contained in:
@@ -43,9 +43,9 @@ Running at: {}MHz
|
|||||||
# Create ST7735 LCD display class.
|
# Create ST7735 LCD display class.
|
||||||
disp = ST7735.ST7735(
|
disp = ST7735.ST7735(
|
||||||
port=0,
|
port=0,
|
||||||
cs=ST7735.BG_SPI_CS_FRONT,
|
cs=ST7735.BG_SPI_CS_FRONT, # BG_SPI_CSB_BACK or BG_SPI_CS_FRONT
|
||||||
dc=9,
|
dc=9,
|
||||||
backlight=18,
|
backlight=19, # 18 for back BG slot, 19 for front BG slot.
|
||||||
rotation=90,
|
rotation=90,
|
||||||
spi_speed_hz=SPI_SPEED_MHZ * 1000000
|
spi_speed_hz=SPI_SPEED_MHZ * 1000000
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ else:
|
|||||||
# Create TFT LCD display class.
|
# Create TFT LCD display class.
|
||||||
disp = ST7735.ST7735(
|
disp = ST7735.ST7735(
|
||||||
port=0,
|
port=0,
|
||||||
cs=ST7735.BG_SPI_CS_FRONT,
|
cs=ST7735.BG_SPI_CS_FRONT, # BG_SPI_CSB_BACK or BG_SPI_CS_FRONT
|
||||||
dc=9,
|
dc=9,
|
||||||
backlight=18,
|
backlight=19, # 18 for back BG slot, 19 for front BG slot.
|
||||||
spi_speed_hz=4000000
|
spi_speed_hz=4000000
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ image_file = sys.argv[1]
|
|||||||
# Create ST7735 LCD display class.
|
# Create ST7735 LCD display class.
|
||||||
disp = ST7735.ST7735(
|
disp = ST7735.ST7735(
|
||||||
port=0,
|
port=0,
|
||||||
cs=ST7735.BG_SPI_CS_FRONT,
|
cs=ST7735.BG_SPI_CS_FRONT, # BG_SPI_CSB_BACK or BG_SPI_CS_FRONT
|
||||||
dc=9,
|
dc=9,
|
||||||
backlight=18,
|
backlight=19, # 18 for back BG slot, 19 for front BG slot.
|
||||||
rotation=90,
|
rotation=90,
|
||||||
spi_speed_hz=4000000
|
spi_speed_hz=4000000
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ MESSAGE = "Hello World! How are you today?"
|
|||||||
# Create ST7735 LCD display class.
|
# Create ST7735 LCD display class.
|
||||||
disp = ST7735.ST7735(
|
disp = ST7735.ST7735(
|
||||||
port=0,
|
port=0,
|
||||||
cs=ST7735.BG_SPI_CS_FRONT,
|
cs=ST7735.BG_SPI_CS_FRONT, # BG_SPI_CSB_BACK or BG_SPI_CS_FRONT
|
||||||
dc=9,
|
dc=9,
|
||||||
backlight=18,
|
backlight=19, # 18 for back BG slot, 19 for front BG slot.
|
||||||
rotation=90,
|
rotation=90,
|
||||||
spi_speed_hz=10000000
|
spi_speed_hz=10000000
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -35,9 +35,9 @@ breakout into the rear slot.
|
|||||||
# Create ST7735 LCD display class.
|
# Create ST7735 LCD display class.
|
||||||
disp = ST7735.ST7735(
|
disp = ST7735.ST7735(
|
||||||
port=0,
|
port=0,
|
||||||
cs=ST7735.BG_SPI_CS_FRONT,
|
cs=ST7735.BG_SPI_CS_FRONT, # BG_SPI_CSB_BACK or BG_SPI_CS_FRONT
|
||||||
dc=9,
|
dc=9,
|
||||||
backlight=18,
|
backlight=19, # 18 for back BG slot, 19 for front BG slot.
|
||||||
rotation=90,
|
rotation=90,
|
||||||
spi_speed_hz=4000000
|
spi_speed_hz=4000000
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user