Skip to content

Commit 0b27495

Browse files
authored
Open in Mu for line endings and last line blank
1 parent afc41ca commit 0b27495

File tree

3 files changed

+55
-56
lines changed

3 files changed

+55
-56
lines changed

EInk_CircuitPython_Quickstart/213_tricolor_eink_fw_badge.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@
7979
# Draw simple text using the built-in font into a displayio group
8080
# For smaller text, change scale=2 to scale=1
8181
text_group = displayio.Group(max_size=10, scale=2,
82-
x=DISPLAY_HEIGHT + 10,
82+
x=DISPLAY_HEIGHT + 10,
8383
y=int(DISPLAY_HEIGHT/2) - 13)
8484
first_name = "Limor"
85-
text_area = label.Label(terminalio.FONT, text=first_name,
85+
text_area = label.Label(terminalio.FONT, text=first_name,
8686
color=TEXT_COLOR)
8787
text_group.append(text_area) # Add this text to the text group
8888
g.append(text_group)
Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
1-
"""
2-
Simple bitmap test script for 2.7" 264x176 Tri-Color display shield
3-
Supported products:
4-
* Adafruit 2.7" Tri-Color ePaper Display Shield
5-
https://www.adafruit.com/product/4229
6-
7-
This program requires the adafruit_il91874 library in /lib
8-
for CircuitPython 5.0 and above which has displayio support.
9-
"""
10-
11-
import time
12-
import board
13-
import displayio
14-
import adafruit_il91874
15-
16-
# Used to ensure the display is free in CircuitPython
17-
displayio.release_displays()
18-
19-
# Define the pins needed for display use on the Metro
20-
spi = board.SPI()
21-
epd_cs = board.D10
22-
epd_dc = board.D9
23-
24-
# Create the displayio connection to the display pins
25-
display_bus = displayio.FourWire(spi, command=epd_dc, chip_select=epd_cs,
26-
baudrate=1000000)
27-
time.sleep(1) # Wait a bit
28-
29-
# Create the display object - the third color is red (0xff0000)
30-
display = adafruit_il91874.IL91874(display_bus, width=264, height=176,
31-
highlight_color=0xff0000, rotation=90)
32-
33-
# Create a display group for our screen objects
34-
g = displayio.Group()
35-
36-
# Display a ruler graphic from the root directory of the CIRCUITPY drive
37-
f = open("/display-ruler.bmp", "rb")
38-
39-
pic = displayio.OnDiskBitmap(f)
40-
# Create a Tilegrid with the bitmap and put in the displayio group
41-
t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter())
42-
g.append(t)
43-
44-
# Place the display group on the screen
45-
display.show(g)
46-
47-
# Refresh the display to have it actually show
48-
# NOTE: Do not refresh eInk displays more often than 180 seconds!
49-
display.refresh()
50-
51-
time.sleep(180)
52-
while True:
53-
pass
1+
"""
2+
Simple bitmap test script for 2.7" 264x176 Tri-Color display shield
3+
Supported products:
4+
* Adafruit 2.7" Tri-Color ePaper Display Shield
5+
https://www.adafruit.com/product/4229
6+
7+
This program requires the adafruit_il91874 library in /lib
8+
for CircuitPython 5.0 and above which has displayio support.
9+
"""
10+
11+
import time
12+
import board
13+
import displayio
14+
import adafruit_il91874
15+
16+
# Used to ensure the display is free in CircuitPython
17+
displayio.release_displays()
18+
19+
# Define the pins needed for display use on the Metro
20+
spi = board.SPI()
21+
epd_cs = board.D10
22+
epd_dc = board.D9
23+
24+
# Create the displayio connection to the display pins
25+
display_bus = displayio.FourWire(spi, command=epd_dc, chip_select=epd_cs,
26+
baudrate=1000000)
27+
time.sleep(1) # Wait a bit
28+
29+
# Create the display object - the third color is red (0xff0000)
30+
display = adafruit_il91874.IL91874(display_bus, width=264, height=176,
31+
highlight_color=0xff0000, rotation=90)
32+
33+
# Create a display group for our screen objects
34+
g = displayio.Group()
35+
36+
# Display a ruler graphic from the root directory of the CIRCUITPY drive
37+
f = open("/display-ruler.bmp", "rb")
38+
39+
pic = displayio.OnDiskBitmap(f)
40+
# Create a Tilegrid with the bitmap and put in the displayio group
41+
t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter())
42+
g.append(t)
43+
44+
# Place the display group on the screen
45+
display.show(g)
46+
47+
# Refresh the display to have it actually show
48+
# NOTE: Do not refresh eInk displays more often than 180 seconds!
49+
display.refresh()
50+
51+
time.sleep(180)
52+
while True:
53+
pass

EInk_CircuitPython_Quickstart/27_tricolor_eink_shield_text.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
Supported products:
44
* Adafruit 2.7" Tri-Color ePaper Display Shield
55
https://www.adafruit.com/product/4229
6-
76
This program requires the adafruit_il91874 and the
87
adafruit_display_text library in /lib on the CIRCUITPY drive
98
for CircuitPython 5.0 and above which has displayio support.

0 commit comments

Comments
 (0)