/ README.rst
README.rst
1 Introduction 2 ============ 3 4 .. image:: https://readthedocs.org/projects/adafruit-circuitpython-il0373/badge/?version=latest 5 :target: https://circuitpython.readthedocs.io/projects/il0373/en/latest/ 6 :alt: Documentation Status 7 8 .. image:: https://img.shields.io/discord/327254708534116352.svg 9 :target: https://adafru.it/discord 10 :alt: Discord 11 12 .. image:: https://github.com/adafruit/Adafruit_CircuitPython_IL0373/workflows/Build%20CI/badge.svg 13 :target: https://github.com/adafruit/Adafruit_CircuitPython_IL0373/actions 14 :alt: Build Status 15 16 CircuitPython `displayio` driver for IL0373-based ePaper displays 17 18 19 Dependencies 20 ============= 21 This driver depends on: 22 23 * `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_ 24 25 Please ensure all dependencies are available on the CircuitPython filesystem. 26 This is easily achieved by downloading 27 `the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_. 28 29 Installing from PyPI 30 ===================== 31 .. note:: This library is not available on PyPI yet. Install documentation is included 32 as a standard element. Stay tuned for PyPI availability! 33 34 On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from 35 PyPI <https://pypi.org/project/adafruit-circuitpython-il0373/>`_. To install for current user: 36 37 .. code-block:: shell 38 39 pip3 install adafruit-circuitpython-il0373 40 41 To install system-wide (this may be required in some cases): 42 43 .. code-block:: shell 44 45 sudo pip3 install adafruit-circuitpython-il0373 46 47 To install in a virtual environment in your current project: 48 49 .. code-block:: shell 50 51 mkdir project-name && cd project-name 52 python3 -m venv .env 53 source .env/bin/activate 54 pip3 install adafruit-circuitpython-il0373 55 56 Usage Example 57 ============= 58 59 .. code-block: python 60 61 """Simple test script for 2.13" 212x104 tri-color featherwing. 62 63 Supported products: 64 * Adafruit 2.13" Tri-Color FeatherWing 65 * https://www.adafruit.com/product/4128 66 """ 67 68 import time 69 import board 70 import displayio 71 import adafruit_il0373 72 73 displayio.release_displays() 74 75 epd_cs = board.D9 76 epd_dc = board.D10 77 78 display_bus = displayio.FourWire(board.SPI(), command=epd_dc, chip_select=epd_cs, baudrate=1000000) 79 time.sleep(1) 80 81 display = adafruit_il0373.IL0373(display_bus, width=212, height=104, rotation=90, 82 highlight_color=0xff0000) 83 84 g = displayio.Group() 85 86 f = open("/display-ruler.bmp", "rb") 87 88 pic = displayio.OnDiskBitmap(f) 89 t = displayio.TileGrid(pic, pixel_shader=displayio.ColorConverter()) 90 g.append(t) 91 92 display.show(g) 93 94 display.refresh() 95 96 print("refreshed") 97 98 time.sleep(120) 99 100 Contributing 101 ============ 102 103 Contributions are welcome! Please read our `Code of Conduct 104 <https://github.com/adafruit/Adafruit_CircuitPython_IL0373/blob/master/CODE_OF_CONDUCT.md>`_ 105 before contributing to help this project stay welcoming. 106 107 Documentation 108 ============= 109 110 For information on building library documentation, please check out `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.