Skip to content

Start linting #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 55 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ Introduction
:target: https://github.com/psf/black
:alt: Code Style: Black

Driver for SPD1656 driven ACeP (7-color) e-paper displays
Driver for SPD1656 driven ACeP (7-color) e-paper displays.

Please note that we do not have Blinka support for this yet. So it won't work with a Raspberry Pi.

Dependencies
=============
Expand All @@ -36,17 +37,18 @@ This is easily achieved by downloading
or individual libraries can be installed using
`circup <https://github.com/adafruit/circup>`_.

.. todo:: Describe the Adafruit product this library works with. For PCBs, you can also add the
image from the assets folder in the PCB's GitHub repo.
This supports the common 4" and 5.65" ACeP displays.

* [Waveshare 4"](https://www.waveshare.com/4.01inch-e-paper-hat-f.htm)
* [Waveshare 5.65"](https://www.waveshare.com/5.65inch-e-paper-module-f.htm)
* [Pimoroni 5.7"](https://shop.pimoroni.com/products/inky-impression-5-7) (Likely the same as 5.65".)
* [Pimoroni 4"](https://shop.pimoroni.com/products/inky-impression-4)

`Purchase one from the Adafruit shop <http://www.adafruit.com/products/>`_
Installing from PyPI
=====================
.. note:: This library is not available on PyPI yet. Install documentation is included
as a standard element. Stay tuned for PyPI availability!
Comment on lines 49 to 50

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we are doing everything on PyPi now, and that the cookie-cutter choices do that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still here in the cookiecutter, likely under the assumption that maybe community libraries won't publish (or at least that was my thought). It may be worth removing this from the template, or at least doing so if it's an Adafruit library.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't put it on pypi because blinka displayio hasn't been updated to work with acep displays. I imagine it will be at some point though. That's why I left it here.


.. todo:: Remove the above note if PyPI version is/will be available at time of release.

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
PyPI <https://pypi.org/project/adafruit-circuitpython-spd1656/>`_.
To install for current user:
Expand Down Expand Up @@ -96,8 +98,53 @@ Or the following command to update an existing version:
Usage Example
=============

.. todo:: Add a quick, simple example. It and other examples should live in the
examples folder and be included in docs/examples.rst.
.. code-block:: python

# SPDX-FileCopyrightText: Copyright (c) 2023 Scott Shawcroft for Adafruit Industries
# SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries
#
# SPDX-License-Identifier: Unlicense

"""Simple test script for 5.6" 600x448 7-color ACeP display.
"""
# pylint: disable=no-member

import time
import board
import displayio
import adafruit_spd1656

displayio.release_displays()

# This pinout works on a Feather RP2040 and may need to be altered for other boards.
spi = board.SPI() # Uses SCK and MOSI
epd_cs = board.D9
epd_dc = board.D10
epd_reset = board.D11
epd_busy = board.D12

display_bus = displayio.FourWire(
spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000
)

display = adafruit_spd1656.SPD1656(
display_bus, width=600, height=448, busy_pin=epd_busy
)

g = displayio.Group()

fn = "/display-ruler-720p.bmp"

with open(fn, "rb") as f:
pic = displayio.OnDiskBitmap(f)
t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)
g.append(t)

display.show(g)

display.refresh()

time.sleep(120)

Documentation
=============
Expand Down
9 changes: 4 additions & 5 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@ Table of Contents
.. toctree::
:caption: Tutorials

.. todo:: Add any Learn guide links here. If there are none, then simply delete this todo and leave
the toctree above for use later.

.. toctree::
:caption: Related Products

.. todo:: Add any product links here. If there are none, then simply delete this todo and leave
the toctree above for use later.
Pimoroni 4" <https://shop.pimoroni.com/products/inky-impression-4>
Pimoroni 5.7" <https://shop.pimoroni.com/products/inky-impression-5-7>
Waveshare 4" <https://www.waveshare.com/4.01inch-e-paper-hat-f.htm>
Waveshare 5.65" <https://www.waveshare.com/5.65inch-e-paper-module-f.htm>

.. toctree::
:caption: Other Links
Expand Down
2 changes: 2 additions & 0 deletions examples/display-ruler-720p.bmp.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
# SPDX-License-Identifier: MIT

Adafruit-Blinka
adafruit-blinka-displayio