Skip to content

Commit 6cf96d5

Browse files
authored
Merge pull request #41 from makermelissa/master
Added 240x135 Display support to Pillow Examples
2 parents befedf2 + d69e81e commit 6cf96d5

3 files changed

+9
-0
lines changed

examples/rgb_display_pillow_demo.py

+3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@
2323
# Setup SPI bus using hardware SPI:
2424
spi = board.SPI()
2525

26+
# pylint: disable=line-too-long
2627
# Create the display:
2728
#disp = st7789.ST7789(spi, rotation=90 # 2.0" ST7789
2829
#disp = st7789.ST7789(spi, height=240, y_offset=80, rotation=90 # 1.3", 1.54" ST7789
30+
#disp = st7789.ST7789(spi, rotation=90, width=135, height=240, x_offset=53, y_offset=40, # 1.14" ST7789
2931
#disp = hx8357.HX8357(spi, rotation=180, # 3.5" HX8357
3032
#disp = st7735.ST7735R(spi, rotation=90, # 1.8" ST7735R
3133
#disp = st7735.ST7735R(spi, rotation=270, height=128, x_offset=2, y_offset=3, # 1.44" ST7735R
@@ -35,6 +37,7 @@
3537
#disp = ssd1331.SSD1331(spi, rotation=180, # 0.96" SSD1331
3638
disp = ili9341.ILI9341(spi, rotation=90, # 2.2", 2.4", 2.8", 3.2" ILI9341
3739
cs=cs_pin, dc=dc_pin, rst=reset_pin, baudrate=BAUDRATE)
40+
# pylint: enable=line-too-long
3841

3942
# Create blank image for drawing.
4043
# Make sure to create image with mode 'RGB' for full color.

examples/rgb_display_pillow_image.py

+3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@
1919
# Setup SPI bus using hardware SPI:
2020
spi = board.SPI()
2121

22+
# pylint: disable=line-too-long
2223
# Create the display:
2324
#disp = st7789.ST7789(spi, rotation=90 # 2.0" ST7789
2425
#disp = st7789.ST7789(spi, height=240, y_offset=80, rotation=90 # 1.3", 1.54" ST7789
26+
#disp = st7789.ST7789(spi, rotation=90, width=135, height=240, x_offset=53, y_offset=40, # 1.14" ST7789
2527
#disp = hx8357.HX8357(spi, rotation=180, # 3.5" HX8357
2628
#disp = st7735.ST7735R(spi, rotation=90, # 1.8" ST7735R
2729
#disp = st7735.ST7735R(spi, rotation=270, height=128, x_offset=2, y_offset=3, # 1.44" ST7735R
@@ -31,6 +33,7 @@
3133
#disp = ssd1331.SSD1331(spi, rotation=180, # 0.96" SSD1331
3234
disp = ili9341.ILI9341(spi, rotation=90, # 2.2", 2.4", 2.8", 3.2" ILI9341
3335
cs=cs_pin, dc=dc_pin, rst=reset_pin, baudrate=BAUDRATE)
36+
# pylint: enable=line-too-long
3437

3538
# Create blank image for drawing.
3639
# Make sure to create image with mode 'RGB' for full color.

examples/rgb_display_pillow_stats.py

+3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@
2121
# Setup SPI bus using hardware SPI:
2222
spi = board.SPI()
2323

24+
# pylint: disable=line-too-long
2425
# Create the display:
2526
#disp = st7789.ST7789(spi, rotation=90 # 2.0" ST7789
2627
#disp = st7789.ST7789(spi, height=240, y_offset=80, rotation=90 # 1.3", 1.54" ST7789
28+
#disp = st7789.ST7789(spi, rotation=90, width=135, height=240, x_offset=53, y_offset=40, # 1.14" ST7789
2729
#disp = hx8357.HX8357(spi, rotation=180, # 3.5" HX8357
2830
#disp = st7735.ST7735R(spi, rotation=90, # 1.8" ST7735R
2931
#disp = st7735.ST7735R(spi, rotation=270, height=128, x_offset=2, y_offset=3, # 1.44" ST7735R
@@ -33,6 +35,7 @@
3335
#disp = ssd1331.SSD1331(spi, rotation=180, # 0.96" SSD1331
3436
disp = ili9341.ILI9341(spi, rotation=90, # 2.2", 2.4", 2.8", 3.2" ILI9341
3537
cs=cs_pin, dc=dc_pin, rst=reset_pin, baudrate=BAUDRATE)
38+
# pylint: enable=line-too-long
3639

3740
# Create blank image for drawing.
3841
# Make sure to create image with mode 'RGB' for full color.

0 commit comments

Comments
 (0)