@@ -45,8 +45,6 @@ Installing from PyPI
45
45
.. note :: This library is not available on PyPI yet. Install documentation is included
46
46
as a standard element. Stay tuned for PyPI availability!
47
47
48
- .. todo :: Remove the above note if PyPI version is/will be available at time of release.
49
-
50
48
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
51
49
PyPI <https://pypi.org/project/adafruit-circuitpython-acep7in/> `_.
52
50
To install for current user:
@@ -96,8 +94,55 @@ Or the following command to update an existing version:
96
94
Usage Example
97
95
=============
98
96
99
- .. todo :: Add a quick, simple example. It and other examples should live in the
100
- examples folder and be included in docs/examples.rst.
97
+ .. code-block :: python
98
+
99
+ # SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
100
+ # SPDX-FileCopyrightText: Copyright (c) 2023 Scott Shawcroft for Adafruit Industries
101
+ # SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries
102
+ #
103
+ # SPDX-License-Identifier: Unlicense
104
+
105
+ """ Simple test script for 5.6" 600x448 7-color ACeP display.
106
+ """
107
+ # pylint: disable=no-member
108
+
109
+ import time
110
+ import board
111
+ import displayio
112
+ import adafruit_acep7in
113
+
114
+ displayio.release_displays()
115
+
116
+ # This pinout works on a Feather RP2040 and may need to be altered for other boards.
117
+ spi = board.SPI() # Uses SCK and MOSI
118
+ epd_cs = board.D9
119
+ epd_dc = board.D10
120
+ epd_reset = board.D11
121
+ epd_busy = board.D12
122
+
123
+ display_bus = displayio.FourWire(
124
+ spi, command = epd_dc, chip_select = epd_cs, reset = epd_reset, baudrate = 1000000
125
+ )
126
+
127
+ display = adafruit_acep7in.ACeP7In(
128
+ display_bus, width = 800 , height = 480 , busy_pin = epd_busy
129
+ )
130
+
131
+ g = displayio.Group()
132
+
133
+ fn = " /display-ruler-720p.bmp"
134
+
135
+ with open (fn, " rb" ) as f:
136
+ pic = displayio.OnDiskBitmap(f)
137
+ t = displayio.TileGrid(pic, pixel_shader = pic.pixel_shader)
138
+ g.append(t)
139
+
140
+ display.show(g)
141
+
142
+ display.refresh()
143
+
144
+ time.sleep(120 )
145
+
101
146
102
147
Documentation
103
148
=============
0 commit comments