Merge pull request #1 from adafruit/cleanup
Some checks failed
Build CI / test (push) Has been cancelled
Some checks failed
Build CI / test (push) Has been cancelled
add display ruler bitmap
This commit is contained in:
commit
b6f385ea1d
5 changed files with 14 additions and 17 deletions
12
README.rst
12
README.rst
|
|
@ -95,7 +95,6 @@ Usage Example
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import board
|
import board
|
||||||
import busio
|
|
||||||
import displayio
|
import displayio
|
||||||
from fourwire import FourWire
|
from fourwire import FourWire
|
||||||
|
|
||||||
|
|
@ -103,12 +102,11 @@ Usage Example
|
||||||
|
|
||||||
displayio.release_displays()
|
displayio.release_displays()
|
||||||
|
|
||||||
# This pinout works on a MagTag with the newer screen and may need to be altered for other boards.
|
spi = board.SPI()
|
||||||
spi = busio.SPI(board.EPD_SCK, board.EPD_MOSI) # Uses SCK and MOSI
|
epd_cs = board.D9
|
||||||
epd_cs = board.EPD_CS
|
epd_dc = board.D10
|
||||||
epd_dc = board.EPD_DC
|
epd_reset = board.D6
|
||||||
epd_reset = board.EPD_RESET
|
epd_busy = board.D5
|
||||||
epd_busy = board.EPD_BUSY
|
|
||||||
|
|
||||||
display_bus = FourWire(spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000)
|
display_bus = FourWire(spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ class JD79661(EPaperDisplay):
|
||||||
start_sequence[res_pos + 4] = (width >> 8) & 0xFF
|
start_sequence[res_pos + 4] = (width >> 8) & 0xFF
|
||||||
start_sequence[res_pos + 5] = width & 0xFF
|
start_sequence[res_pos + 5] = width & 0xFF
|
||||||
|
|
||||||
print(start_sequence.hex(" "))
|
# print(start_sequence.hex(" "))
|
||||||
|
|
||||||
super().__init__(
|
super().__init__(
|
||||||
bus,
|
bus,
|
||||||
|
|
|
||||||
BIN
examples/display-ruler-640x360.bmp
Normal file
BIN
examples/display-ruler-640x360.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 225 KiB |
2
examples/display-ruler-640x360.bmp.license
Normal file
2
examples/display-ruler-640x360.bmp.license
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
@ -1,14 +1,12 @@
|
||||||
# SPDX-FileCopyrightText: 2025 Scott Shawcroft, written for Adafruit Industries
|
# SPDX-FileCopyrightText: 2025 Scott Shawcroft, written for Adafruit Industries
|
||||||
# SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries
|
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Unlicense
|
# SPDX-License-Identifier: Unlicense
|
||||||
|
|
||||||
"""Simple test script for 2.9" 296x128 display. This example runs it in mono mode."""
|
"""Simple test script for 2.13" Quad Color Display"""
|
||||||
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import board
|
import board
|
||||||
import busio
|
|
||||||
import displayio
|
import displayio
|
||||||
from fourwire import FourWire
|
from fourwire import FourWire
|
||||||
|
|
||||||
|
|
@ -16,12 +14,11 @@ import adafruit_jd79661
|
||||||
|
|
||||||
displayio.release_displays()
|
displayio.release_displays()
|
||||||
|
|
||||||
# This pinout works on a MagTag with the newer screen and may need to be altered for other boards.
|
spi = board.SPI()
|
||||||
spi = busio.SPI(board.EPD_SCK, board.EPD_MOSI) # Uses SCK and MOSI
|
epd_cs = board.D9
|
||||||
epd_cs = board.EPD_CS
|
epd_dc = board.D10
|
||||||
epd_dc = board.EPD_DC
|
epd_reset = board.D6
|
||||||
epd_reset = board.EPD_RESET
|
epd_busy = board.D5
|
||||||
epd_busy = board.EPD_BUSY
|
|
||||||
|
|
||||||
display_bus = FourWire(spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000)
|
display_bus = FourWire(spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue