Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hierophect/5082f9527efa68718a42942928a46659 to your computer and use it in GitHub Desktop.
Save hierophect/5082f9527efa68718a42942928a46659 to your computer and use it in GitHub Desktop.
attempt
import digitalio
import terminalio
import board
import displayio
import adafruit_il0398
from babel.babel import Babel
from adafruit_display_text import label
import time
# cs = digitalio.DigitalInOut(board.D6)
# babel = FlashBabel(cs)
displayio.release_displays()
spi = board.SPI() # Uses SCK and MOSI
epd_cs = board.D9
epd_dc = board.D10
epd_reset = board.A4
epd_busy = board.A3
# Create the displayio connection to the display pins
display_bus = displayio.FourWire(spi, command=epd_dc, chip_select=epd_cs,
reset=epd_reset, baudrate=1000000)
time.sleep(1) # Wait a bit
# Create the display object - the third color is red (0xff0000)
DISPLAY_WIDTH = 400
DISPLAY_HEIGHT = 300
display = adafruit_il0398.IL0398(display_bus, width=DISPLAY_WIDTH,
height=DISPLAY_HEIGHT,
rotation=0, busy_pin=epd_busy,
highlight_color=0x000000)
# text = """Short sayings:
# जान है तो जहान है
# 風向轉變時,有人築牆,\n有人造風車
# Один в поле не воин.
# ἄνθρωπος μέτρον
# """
# uppercase_text = babel.localized_uppercase(text)
uppercase_text = "HELLO WORLD"
text_area = label.Label(terminalio.FONT, text=uppercase_text, color=0xFFFFFF) #0xFFFFFF
text_area.x = 0
text_area.y = 72
display.show(text_area)
time.sleep(1)
display.refresh()
while True:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment