--- /srv/rebuilderd/tmp/rebuilderdRDzWZL/inputs/luma.oled-doc_3.10.0-1_all.deb +++ /srv/rebuilderd/tmp/rebuilderdRDzWZL/out/luma.oled-doc_3.10.0-1_all.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2023-01-21 09:38:27.000000 debian-binary │ -rw-r--r-- 0 0 0 2124 2023-01-21 09:38:27.000000 control.tar.xz │ --rw-r--r-- 0 0 0 1382152 2023-01-21 09:38:27.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 1381792 2023-01-21 09:38:27.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./control │ │ │ @@ -1,13 +1,13 @@ │ │ │ Package: luma.oled-doc │ │ │ Source: luma.oled │ │ │ Version: 3.10.0-1 │ │ │ Architecture: all │ │ │ Maintainer: Debian Electronics Team │ │ │ -Installed-Size: 2143 │ │ │ +Installed-Size: 2119 │ │ │ Depends: libjs-sphinxdoc (>= 5.2) │ │ │ Section: python │ │ │ Priority: optional │ │ │ Multi-Arch: foreign │ │ │ Homepage: https://github.com/rm-hull/luma.oled │ │ │ Description: doc for library interfacing OLED matrix displays │ │ │ Library interfacing OLED matrix displays with the │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ ├── data.tar.xz │ ├── data.tar │ │ ├── file list │ │ │ @@ -38,23 +38,23 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 28 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/_static/default.css │ │ │ -rw-r--r-- 0 root (0) root (0) 421 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/_static/documentation_options.js │ │ │ -rw-r--r-- 0 root (0) root (0) 286 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/_static/file.png │ │ │ -rw-r--r-- 0 root (0) root (0) 299 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/_static/graphviz.css │ │ │ -rw-r--r-- 0 root (0) root (0) 90 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/_static/minus.png │ │ │ -rw-r--r-- 0 root (0) root (0) 90 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/_static/plus.png │ │ │ -rw-r--r-- 0 root (0) root (0) 4846 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/_static/pygments.css │ │ │ --rw-r--r-- 0 root (0) root (0) 216070 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/api-documentation.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 193937 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/api-documentation.html │ │ │ -rw-r--r-- 0 root (0) root (0) 24973 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/genindex.html │ │ │ --rw-r--r-- 0 root (0) root (0) 25675 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/hardware.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 25483 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/hardware.html │ │ │ -rw-r--r-- 0 root (0) root (0) 27872 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/index.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6870 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/install.html │ │ │ -rw-r--r-- 0 root (0) root (0) 9073 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/intro.html │ │ │ -rw-r--r-- 0 root (0) root (0) 1873 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/objects.inv │ │ │ -rw-r--r-- 0 root (0) root (0) 4655 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/py-modindex.html │ │ │ --rw-r--r-- 0 root (0) root (0) 18130 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/python-usage.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 17276 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/python-usage.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6356 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/references.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4007 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/search.html │ │ │ -rw-r--r-- 0 root (0) root (0) 39153 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/searchindex.js │ │ │ -rw-r--r-- 0 root (0) root (0) 8598 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/software.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6911 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/troubleshooting.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7140 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/upgrade.html │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2023-01-21 09:38:27.000000 ./usr/share/doc/luma.oled-doc/html/_static/_sphinx_javascript_frameworks_compat.js -> ../../../../javascript/sphinxdoc/1.0/_sphinx_javascript_frameworks_compat.js │ │ ├── ./usr/share/doc/luma.oled-doc/html/api-documentation.html │ │ │ @@ -108,33 +108,33 @@ │ │ │ } │ │ │
│ │ │

luma.oled.device

│ │ │

Collection of serial interfaces to OLED devices.

│ │ │
│ │ │
│ │ │ class luma.oled.device.sh1106(serial_interface=None, width=128, height=64, rotate=0, **kwargs)[source]
│ │ │ -

Bases: device

│ │ │ +

Bases: device

│ │ │

Serial interface to a monochrome SH1106 OLED display.

│ │ │

On creation, an initialization sequence is pumped to the display │ │ │ to properly configure it. Further control commands can then be called to │ │ │ affect the brightness and other settings.

│ │ │
│ │ │
│ │ │ capabilities(width, height, rotate, mode='1')
│ │ │

Assigns attributes such as width, height, size and │ │ │ bounding_box correctly oriented from the supplied parameters.

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │ -
  • width (int) – The device width.

  • │ │ │ -
  • height (int) – The device height.

  • │ │ │ -
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ +

  • width (int) – The device width.

  • │ │ │ +
  • height (int) – The device height.

  • │ │ │ +
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ no rotation, 1 is rotate 90° clockwise, 2 is 180° rotation and 3 │ │ │ represents 270° rotation.

  • │ │ │ -
  • mode (str) – The supported color model, one of "1", "RGB" or │ │ │ +

  • mode (str) – The supported color model, one of "1", "RGB" or │ │ │ "RGBA" only.

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ @@ -167,34 +167,34 @@ │ │ │ contrast(level) │ │ │

Switches the display contrast to the desired level, in the range │ │ │ 0-255. Note that setting the level to a low (or zero) value will │ │ │ not necessarily dim the display to nearly off. In other words, │ │ │ this method is NOT suitable for fade-in/out animation.

│ │ │
│ │ │
Parameters
│ │ │ -

level (int) – Desired contrast level in the range of 0-255.

│ │ │ +

level (int) – Desired contrast level in the range of 0-255.

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ data(data)
│ │ │

Sends a data byte or sequence of data bytes through to the delegated │ │ │ serial interface.

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ display(image)[source]
│ │ │ -

Takes a 1-bit PIL.Image and dumps it to the SH1106 │ │ │ +

Takes a 1-bit PIL.Image and dumps it to the SH1106 │ │ │ OLED display.

│ │ │
│ │ │
Parameters
│ │ │ -

image (PIL.Image) – Image to display.

│ │ │ +

image (PIL.Image) – Image to display.

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ hide()
│ │ │ @@ -206,21 +206,21 @@ │ │ │
│ │ │ preprocess(image)
│ │ │

Provides a preprocessing facility (which may be overridden) whereby the supplied image is │ │ │ rotated according to the device’s rotate capability. If this method is │ │ │ overridden, it is important to call the super method.

│ │ │
│ │ │
Parameters
│ │ │ -

image (PIL.Image.Image) – An image to pre-process.

│ │ │ +

image (PIL.Image.Image) – An image to pre-process.

│ │ │
│ │ │
Returns
│ │ │

A new processed image.

│ │ │
│ │ │
Return type
│ │ │ -

PIL.Image.Image

│ │ │ +

PIL.Image.Image

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ show()
│ │ │ @@ -229,47 +229,47 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ class luma.oled.device.ssd1306(serial_interface=None, width=128, height=64, rotate=0, **kwargs)[source]
│ │ │ -

Bases: device

│ │ │ +

Bases: device

│ │ │

Serial interface to a monochrome SSD1306 OLED display.

│ │ │

On creation, an initialization sequence is pumped to the display │ │ │ to properly configure it. Further control commands can then be called to │ │ │ affect the brightness and other settings.

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │
  • serial_interface – The serial interface (usually a │ │ │ -luma.core.interface.serial.i2c instance) to delegate sending │ │ │ +luma.core.interface.serial.i2c instance) to delegate sending │ │ │ data and commands through.

  • │ │ │ -
  • width (int) – The number of horizontal pixels (optional, defaults to 128).

  • │ │ │ -
  • height (int) – The number of vertical pixels (optional, defaults to 64).

  • │ │ │ -
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ +

  • width (int) – The number of horizontal pixels (optional, defaults to 128).

  • │ │ │ +
  • height (int) – The number of vertical pixels (optional, defaults to 64).

  • │ │ │ +
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ no rotation, 1 is rotate 90° clockwise, 2 is 180° rotation and 3 │ │ │ represents 270° rotation.

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ capabilities(width, height, rotate, mode='1')
│ │ │

Assigns attributes such as width, height, size and │ │ │ bounding_box correctly oriented from the supplied parameters.

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │ -
  • width (int) – The device width.

  • │ │ │ -
  • height (int) – The device height.

  • │ │ │ -
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ +

  • width (int) – The device width.

  • │ │ │ +
  • height (int) – The device height.

  • │ │ │ +
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ no rotation, 1 is rotate 90° clockwise, 2 is 180° rotation and 3 │ │ │ represents 270° rotation.

  • │ │ │ -
  • mode (str) – The supported color model, one of "1", "RGB" or │ │ │ +

  • mode (str) – The supported color model, one of "1", "RGB" or │ │ │ "RGBA" only.

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ @@ -302,34 +302,34 @@ │ │ │ contrast(level) │ │ │

Switches the display contrast to the desired level, in the range │ │ │ 0-255. Note that setting the level to a low (or zero) value will │ │ │ not necessarily dim the display to nearly off. In other words, │ │ │ this method is NOT suitable for fade-in/out animation.

│ │ │
│ │ │
Parameters
│ │ │ -

level (int) – Desired contrast level in the range of 0-255.

│ │ │ +

level (int) – Desired contrast level in the range of 0-255.

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ data(data)
│ │ │

Sends a data byte or sequence of data bytes through to the delegated │ │ │ serial interface.

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ display(image)[source]
│ │ │ -

Takes a 1-bit PIL.Image and dumps it to the OLED │ │ │ +

Takes a 1-bit PIL.Image and dumps it to the OLED │ │ │ display.

│ │ │
│ │ │
Parameters
│ │ │ -

image (PIL.Image) – Image to display.

│ │ │ +

image (PIL.Image) – Image to display.

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ hide()
│ │ │ @@ -341,21 +341,21 @@ │ │ │
│ │ │ preprocess(image)
│ │ │

Provides a preprocessing facility (which may be overridden) whereby the supplied image is │ │ │ rotated according to the device’s rotate capability. If this method is │ │ │ overridden, it is important to call the super method.

│ │ │
│ │ │
Parameters
│ │ │ -

image (PIL.Image.Image) – An image to pre-process.

│ │ │ +

image (PIL.Image.Image) – An image to pre-process.

│ │ │
│ │ │
Returns
│ │ │

A new processed image.

│ │ │
│ │ │
Return type
│ │ │ -

PIL.Image.Image

│ │ │ +

PIL.Image.Image

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ show()
│ │ │ @@ -373,19 +373,19 @@ │ │ │

On creation, an initialization sequence is pumped to the display │ │ │ to properly configure it. Further control commands can then be called to │ │ │ affect the brightness and other settings.

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │
  • serial_interface – The serial interface (usually a │ │ │ -luma.core.interface.serial.spi instance) to delegate sending │ │ │ +luma.core.interface.serial.spi instance) to delegate sending │ │ │ data and commands through.

  • │ │ │ -
  • width (int) – The number of horizontal pixels (optional, defaults to 128).

  • │ │ │ -
  • height (int) – The number of vertical pixels (optional, defaults to 64).

  • │ │ │ -
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ +

  • width (int) – The number of horizontal pixels (optional, defaults to 128).

  • │ │ │ +
  • height (int) – The number of vertical pixels (optional, defaults to 64).

  • │ │ │ +
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ no rotation, 1 is rotate 90° clockwise, 2 is 180° rotation and 3 │ │ │ represents 270° rotation.

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │

New in version 3.1.0.

│ │ │ @@ -394,20 +394,20 @@ │ │ │
│ │ │ capabilities(width, height, rotate, mode='1')
│ │ │

Assigns attributes such as width, height, size and │ │ │ bounding_box correctly oriented from the supplied parameters.

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │ -
  • width (int) – The device width.

  • │ │ │ -
  • height (int) – The device height.

  • │ │ │ -
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ +

  • width (int) – The device width.

  • │ │ │ +
  • height (int) – The device height.

  • │ │ │ +
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ no rotation, 1 is rotate 90° clockwise, 2 is 180° rotation and 3 │ │ │ represents 270° rotation.

  • │ │ │ -
  • mode (str) – The supported color model, one of "1", "RGB" or │ │ │ +

  • mode (str) – The supported color model, one of "1", "RGB" or │ │ │ "RGBA" only.

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ @@ -440,34 +440,34 @@ │ │ │ contrast(level) │ │ │

Switches the display contrast to the desired level, in the range │ │ │ 0-255. Note that setting the level to a low (or zero) value will │ │ │ not necessarily dim the display to nearly off. In other words, │ │ │ this method is NOT suitable for fade-in/out animation.

│ │ │
│ │ │
Parameters
│ │ │ -

level (int) – Desired contrast level in the range of 0-255.

│ │ │ +

level (int) – Desired contrast level in the range of 0-255.

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ data(data)
│ │ │

Sends a data byte or sequence of data bytes through to the delegated │ │ │ serial interface.

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ display(image)
│ │ │ -

Takes a 1-bit PIL.Image and dumps it to the OLED │ │ │ +

Takes a 1-bit PIL.Image and dumps it to the OLED │ │ │ display.

│ │ │
│ │ │
Parameters
│ │ │ -

image (PIL.Image) – Image to display.

│ │ │ +

image (PIL.Image) – Image to display.

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ hide()
│ │ │ @@ -479,21 +479,21 @@ │ │ │
│ │ │ preprocess(image)
│ │ │

Provides a preprocessing facility (which may be overridden) whereby the supplied image is │ │ │ rotated according to the device’s rotate capability. If this method is │ │ │ overridden, it is important to call the super method.

│ │ │
│ │ │
Parameters
│ │ │ -

image (PIL.Image.Image) – An image to pre-process.

│ │ │ +

image (PIL.Image.Image) – An image to pre-process.

│ │ │
│ │ │
Returns
│ │ │

A new processed image.

│ │ │
│ │ │
Return type
│ │ │ -

PIL.Image.Image

│ │ │ +

PIL.Image.Image

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ show()
│ │ │ @@ -511,42 +511,42 @@ │ │ │

On creation, an initialization sequence is pumped to the │ │ │ display to properly configure it. Further control commands can then be │ │ │ called to affect the brightness and other settings.

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │
  • serial_interface – The serial interface (usually a │ │ │ -luma.core.interface.serial.spi instance) to delegate sending │ │ │ +luma.core.interface.serial.spi instance) to delegate sending │ │ │ data and commands through.

  • │ │ │ -
  • width (int) – The number of horizontal pixels (optional, defaults to 96).

  • │ │ │ -
  • height (int) – The number of vertical pixels (optional, defaults to 64).

  • │ │ │ -
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ +

  • width (int) – The number of horizontal pixels (optional, defaults to 96).

  • │ │ │ +
  • height (int) – The number of vertical pixels (optional, defaults to 64).

  • │ │ │ +
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ no rotation, 1 is rotate 90° clockwise, 2 is 180° rotation and 3 │ │ │ represents 270° rotation.

  • │ │ │ -
  • mode (str) – Supplying “1” or “RGB” effects a different rendering │ │ │ +

  • mode (str) – Supplying “1” or “RGB” effects a different rendering │ │ │ mechanism, either to monochrome or 4-bit greyscale.

  • │ │ │ -
  • framebuffer (str) – Framebuffering strategy, currently instances of │ │ │ +

  • framebuffer (str) – Framebuffering strategy, currently instances of │ │ │ diff_to_previous or full_frame are only supported

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ capabilities(width, height, rotate, mode='1')
│ │ │

Assigns attributes such as width, height, size and │ │ │ bounding_box correctly oriented from the supplied parameters.

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │ -
  • width (int) – The device width.

  • │ │ │ -
  • height (int) – The device height.

  • │ │ │ -
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ +

  • width (int) – The device width.

  • │ │ │ +
  • height (int) – The device height.

  • │ │ │ +
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ no rotation, 1 is rotate 90° clockwise, 2 is 180° rotation and 3 │ │ │ represents 270° rotation.

  • │ │ │ -
  • mode (str) – The supported color model, one of "1", "RGB" or │ │ │ +

  • mode (str) – The supported color model, one of "1", "RGB" or │ │ │ "RGBA" only.

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ @@ -580,15 +580,15 @@ │ │ │ contrast(level) │ │ │

Switches the display contrast to the desired level, in the range │ │ │ 0-255. Note that setting the level to a low (or zero) value will │ │ │ not necessarily dim the display to nearly off. In other words, │ │ │ this method is NOT suitable for fade-in/out animation.

│ │ │
│ │ │
Parameters
│ │ │ -

level (int) – Desired contrast level in the range of 0-255.

│ │ │ +

level (int) – Desired contrast level in the range of 0-255.

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ data(data)
│ │ │ @@ -601,15 +601,15 @@ │ │ │ display(image) │ │ │

Takes a 1-bit monochrome or 24-bit RGB image and renders it │ │ │ to the greyscale OLED display. RGB pixels are converted to 4-bit │ │ │ greyscale values using a simplified Luma calculation, based on │ │ │ Y’=0.299R’+0.587G’+0.114B’.

│ │ │
│ │ │
Parameters
│ │ │ -

image (PIL.Image.Image) – The image to render.

│ │ │ +

image (PIL.Image.Image) – The image to render.

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ hide()
│ │ │ @@ -626,21 +626,21 @@ │ │ │
│ │ │ preprocess(image)
│ │ │

Provides a preprocessing facility (which may be overridden) whereby the supplied image is │ │ │ rotated according to the device’s rotate capability. If this method is │ │ │ overridden, it is important to call the super method.

│ │ │
│ │ │
Parameters
│ │ │ -

image (PIL.Image.Image) – An image to pre-process.

│ │ │ +

image (PIL.Image.Image) – An image to pre-process.

│ │ │
│ │ │
Returns
│ │ │

A new processed image.

│ │ │
│ │ │
Return type
│ │ │ -

PIL.Image.Image

│ │ │ +

PIL.Image.Image

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ show()
│ │ │ @@ -660,20 +660,20 @@ │ │ │
│ │ │ capabilities(width, height, rotate, mode='1')
│ │ │

Assigns attributes such as width, height, size and │ │ │ bounding_box correctly oriented from the supplied parameters.

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │ -
  • width (int) – The device width.

  • │ │ │ -
  • height (int) – The device height.

  • │ │ │ -
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ +

  • width (int) – The device width.

  • │ │ │ +
  • height (int) – The device height.

  • │ │ │ +
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ no rotation, 1 is rotate 90° clockwise, 2 is 180° rotation and 3 │ │ │ represents 270° rotation.

  • │ │ │ -
  • mode (str) – The supported color model, one of "1", "RGB" or │ │ │ +

  • mode (str) – The supported color model, one of "1", "RGB" or │ │ │ "RGBA" only.

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ @@ -707,15 +707,15 @@ │ │ │ contrast(level) │ │ │

Switches the display contrast to the desired level, in the range │ │ │ 0-255. Note that setting the level to a low (or zero) value will │ │ │ not necessarily dim the display to nearly off. In other words, │ │ │ this method is NOT suitable for fade-in/out animation.

│ │ │
│ │ │
Parameters
│ │ │ -

level (int) – Desired contrast level in the range of 0-255.

│ │ │ +

level (int) – Desired contrast level in the range of 0-255.

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ data(data)
│ │ │ @@ -728,15 +728,15 @@ │ │ │ display(image)[source] │ │ │

Takes a 1-bit monochrome or 24-bit RGB image and renders it │ │ │ to the greyscale OLED display. RGB pixels are converted to 8-bit │ │ │ greyscale values using a simplified Luma calculation, based on │ │ │ Y’=0.299R’+0.587G’+0.114B’.

│ │ │
│ │ │
Parameters
│ │ │ -

image (PIL.Image.Image) – the image to render

│ │ │ +

image (PIL.Image.Image) – the image to render

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ hide()
│ │ │ @@ -753,21 +753,21 @@ │ │ │
│ │ │ preprocess(image)
│ │ │

Provides a preprocessing facility (which may be overridden) whereby the supplied image is │ │ │ rotated according to the device’s rotate capability. If this method is │ │ │ overridden, it is important to call the super method.

│ │ │
│ │ │
Parameters
│ │ │ -

image (PIL.Image.Image) – An image to pre-process.

│ │ │ +

image (PIL.Image.Image) – An image to pre-process.

│ │ │
│ │ │
Returns
│ │ │

A new processed image.

│ │ │
│ │ │
Return type
│ │ │ -

PIL.Image.Image

│ │ │ +

PIL.Image.Image

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ show()
│ │ │ @@ -789,20 +789,20 @@ │ │ │
│ │ │ capabilities(width, height, rotate, mode='1')
│ │ │

Assigns attributes such as width, height, size and │ │ │ bounding_box correctly oriented from the supplied parameters.

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │ -
  • width (int) – The device width.

  • │ │ │ -
  • height (int) – The device height.

  • │ │ │ -
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ +

  • width (int) – The device width.

  • │ │ │ +
  • height (int) – The device height.

  • │ │ │ +
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ no rotation, 1 is rotate 90° clockwise, 2 is 180° rotation and 3 │ │ │ represents 270° rotation.

  • │ │ │ -
  • mode (str) – The supported color model, one of "1", "RGB" or │ │ │ +

  • mode (str) – The supported color model, one of "1", "RGB" or │ │ │ "RGBA" only.

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ @@ -835,15 +835,15 @@ │ │ │ contrast(level) │ │ │

Switches the display contrast to the desired level, in the range │ │ │ 0-255. Note that setting the level to a low (or zero) value will │ │ │ not necessarily dim the display to nearly off. In other words, │ │ │ this method is NOT suitable for fade-in/out animation.

│ │ │
│ │ │
Parameters
│ │ │ -

level (int) – Desired contrast level in the range of 0-255.

│ │ │ +

level (int) – Desired contrast level in the range of 0-255.

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ data(data)
│ │ │ @@ -856,15 +856,15 @@ │ │ │ display(image) │ │ │

Takes a 1-bit monochrome or 24-bit RGB image and renders it │ │ │ to the greyscale OLED display. RGB pixels are converted to 4-bit │ │ │ greyscale values using a simplified Luma calculation, based on │ │ │ Y’=0.299R’+0.587G’+0.114B’.

│ │ │
│ │ │
Parameters
│ │ │ -

image (PIL.Image.Image) – The image to render.

│ │ │ +

image (PIL.Image.Image) – The image to render.

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ hide()
│ │ │ @@ -881,21 +881,21 @@ │ │ │
│ │ │ preprocess(image)
│ │ │

Provides a preprocessing facility (which may be overridden) whereby the supplied image is │ │ │ rotated according to the device’s rotate capability. If this method is │ │ │ overridden, it is important to call the super method.

│ │ │
│ │ │
Parameters
│ │ │ -

image (PIL.Image.Image) – An image to pre-process.

│ │ │ +

image (PIL.Image.Image) – An image to pre-process.

│ │ │
│ │ │
Returns
│ │ │

A new processed image.

│ │ │
│ │ │
Return type
│ │ │ -

PIL.Image.Image

│ │ │ +

PIL.Image.Image

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ show()
│ │ │ @@ -920,20 +920,20 @@ │ │ │
│ │ │ capabilities(width, height, rotate, mode='1')
│ │ │

Assigns attributes such as width, height, size and │ │ │ bounding_box correctly oriented from the supplied parameters.

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │ -
  • width (int) – The device width.

  • │ │ │ -
  • height (int) – The device height.

  • │ │ │ -
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ +

  • width (int) – The device width.

  • │ │ │ +
  • height (int) – The device height.

  • │ │ │ +
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ no rotation, 1 is rotate 90° clockwise, 2 is 180° rotation and 3 │ │ │ represents 270° rotation.

  • │ │ │ -
  • mode (str) – The supported color model, one of "1", "RGB" or │ │ │ +

  • mode (str) – The supported color model, one of "1", "RGB" or │ │ │ "RGBA" only.

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ @@ -966,15 +966,15 @@ │ │ │ contrast(level) │ │ │

Switches the display contrast to the desired level, in the range │ │ │ 0-255. Note that setting the level to a low (or zero) value will │ │ │ not necessarily dim the display to nearly off. In other words, │ │ │ this method is NOT suitable for fade-in/out animation.

│ │ │
│ │ │
Parameters
│ │ │ -

level (int) – Desired contrast level in the range of 0-255.

│ │ │ +

level (int) – Desired contrast level in the range of 0-255.

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ data(data)
│ │ │ @@ -987,15 +987,15 @@ │ │ │ display(image) │ │ │

Takes a 1-bit monochrome or 24-bit RGB image and renders it │ │ │ to the greyscale OLED display. RGB pixels are converted to 4-bit │ │ │ greyscale values using a simplified Luma calculation, based on │ │ │ Y’=0.299R’+0.587G’+0.114B’.

│ │ │
│ │ │
Parameters
│ │ │ -

image (PIL.Image.Image) – The image to render.

│ │ │ +

image (PIL.Image.Image) – The image to render.

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ hide()
│ │ │ @@ -1012,21 +1012,21 @@ │ │ │
│ │ │ preprocess(image)
│ │ │

Provides a preprocessing facility (which may be overridden) whereby the supplied image is │ │ │ rotated according to the device’s rotate capability. If this method is │ │ │ overridden, it is important to call the super method.

│ │ │
│ │ │
Parameters
│ │ │ -

image (PIL.Image.Image) – An image to pre-process.

│ │ │ +

image (PIL.Image.Image) – An image to pre-process.

│ │ │
│ │ │
Returns
│ │ │

A new processed image.

│ │ │
│ │ │
Return type
│ │ │ -

PIL.Image.Image

│ │ │ +

PIL.Image.Image

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ show()
│ │ │ @@ -1044,40 +1044,40 @@ │ │ │

On creation, an initialization sequence is pumped to the display to │ │ │ properly configure it. Further control commands can then be called to │ │ │ affect the brightness and other settings.

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │
  • serial_interface – The serial interface (usually a │ │ │ -luma.core.interface.serial.spi instance) to delegate │ │ │ +luma.core.interface.serial.spi instance) to delegate │ │ │ sending data and commands through.

  • │ │ │ -
  • width (int) – The number of horizontal pixels (optional, defaults to 96).

  • │ │ │ -
  • height (int) – The number of vertical pixels (optional, defaults to 64).

  • │ │ │ -
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ +

  • width (int) – The number of horizontal pixels (optional, defaults to 96).

  • │ │ │ +
  • height (int) – The number of vertical pixels (optional, defaults to 64).

  • │ │ │ +
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ no rotation, 1 is rotate 90° clockwise, 2 is 180° rotation and 3 │ │ │ represents 270° rotation.

  • │ │ │ -
  • framebuffer (str) – Framebuffering strategy, currently instances of │ │ │ +

  • framebuffer (str) – Framebuffering strategy, currently instances of │ │ │ diff_to_previous or full_frame are only supported.

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │ capabilities(width, height, rotate, mode='1')
│ │ │

Assigns attributes such as width, height, size and │ │ │ bounding_box correctly oriented from the supplied parameters.

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │ -
  • width (int) – The device width.

  • │ │ │ -
  • height (int) – The device height.

  • │ │ │ -
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ +

  • width (int) – The device width.

  • │ │ │ +
  • height (int) – The device height.

  • │ │ │ +
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ no rotation, 1 is rotate 90° clockwise, 2 is 180° rotation and 3 │ │ │ represents 270° rotation.

  • │ │ │ -
  • mode (str) – The supported color model, one of "1", "RGB" or │ │ │ +

  • mode (str) – The supported color model, one of "1", "RGB" or │ │ │ "RGBA" only.

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ @@ -1110,15 +1110,15 @@ │ │ │ contrast(level)[source] │ │ │

Switches the display contrast to the desired level, in the range │ │ │ 0-255. Note that setting the level to a low (or zero) value will │ │ │ not necessarily dim the display to nearly off. In other words, │ │ │ this method is NOT suitable for fade-in/out animation.

│ │ │
│ │ │
Parameters
│ │ │ -

level (int) – Desired contrast level in the range of 0-255.

│ │ │ +

level (int) – Desired contrast level in the range of 0-255.

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ data(data)
│ │ │ @@ -1128,15 +1128,15 @@ │ │ │ │ │ │
│ │ │
│ │ │ display(image)
│ │ │

Renders a 24-bit RGB image to the Color OLED display.

│ │ │
│ │ │
Parameters
│ │ │ -

image (PIL.Image.Image) – The image to render.

│ │ │ +

image (PIL.Image.Image) – The image to render.

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ hide()
│ │ │ @@ -1153,21 +1153,21 @@ │ │ │
│ │ │ preprocess(image)
│ │ │

Provides a preprocessing facility (which may be overridden) whereby the supplied image is │ │ │ rotated according to the device’s rotate capability. If this method is │ │ │ overridden, it is important to call the super method.

│ │ │
│ │ │
Parameters
│ │ │ -

image (PIL.Image.Image) – An image to pre-process.

│ │ │ +

image (PIL.Image.Image) – An image to pre-process.

│ │ │
│ │ │
Returns
│ │ │

A new processed image.

│ │ │
│ │ │
Return type
│ │ │ -

PIL.Image.Image

│ │ │ +

PIL.Image.Image

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ show()
│ │ │ @@ -1185,25 +1185,25 @@ │ │ │

On creation, an initialization sequence is pumped to │ │ │ the display to properly configure it. Further control commands can then be │ │ │ called to affect the brightness and other settings.

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │
  • serial_interface – The serial interface (usually a │ │ │ -luma.core.interface.serial.spi instance) to delegate │ │ │ +luma.core.interface.serial.spi instance) to delegate │ │ │ sending data and commands through.

  • │ │ │ -
  • width (int) – The number of horizontal pixels (optional, defaults to 128).

  • │ │ │ -
  • height (int) – The number of vertical pixels (optional, defaults to 128).

  • │ │ │ -
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ +

  • width (int) – The number of horizontal pixels (optional, defaults to 128).

  • │ │ │ +
  • height (int) – The number of vertical pixels (optional, defaults to 128).

  • │ │ │ +
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ no rotation, 1 is rotate 90° clockwise, 2 is 180° rotation and 3 │ │ │ represents 270° rotation.

  • │ │ │ -
  • framebuffer (str) – Framebuffering strategy, currently instances of │ │ │ +

  • framebuffer (str) – Framebuffering strategy, currently instances of │ │ │ diff_to_previous or full_frame are only supported.

  • │ │ │ -
  • bgr (bool) – Set to True if device pixels are BGR order (rather than RGB).

  • │ │ │ -
  • h_offset (int) – Horizontal offset (in pixels) of screen to device memory │ │ │ +

  • bgr (bool) – Set to True if device pixels are BGR order (rather than RGB).

  • │ │ │ +
  • h_offset (int) – Horizontal offset (in pixels) of screen to device memory │ │ │ (default: 0)

  • │ │ │
  • v_offset – Vertical offset (in pixels) of screen to device memory │ │ │ (default: 0)

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ @@ -1213,20 +1213,20 @@ │ │ │
│ │ │ capabilities(width, height, rotate, mode='1')
│ │ │

Assigns attributes such as width, height, size and │ │ │ bounding_box correctly oriented from the supplied parameters.

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │ -
  • width (int) – The device width.

  • │ │ │ -
  • height (int) – The device height.

  • │ │ │ -
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ +

  • width (int) – The device width.

  • │ │ │ +
  • height (int) – The device height.

  • │ │ │ +
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ no rotation, 1 is rotate 90° clockwise, 2 is 180° rotation and 3 │ │ │ represents 270° rotation.

  • │ │ │ -
  • mode (str) – The supported color model, one of "1", "RGB" or │ │ │ +

  • mode (str) – The supported color model, one of "1", "RGB" or │ │ │ "RGBA" only.

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ @@ -1260,15 +1260,15 @@ │ │ │ contrast(level)[source] │ │ │

Switches the display contrast to the desired level, in the range │ │ │ 0-255. Note that setting the level to a low (or zero) value will │ │ │ not necessarily dim the display to nearly off. In other words, │ │ │ this method is NOT suitable for fade-in/out animation.

│ │ │
│ │ │
Parameters
│ │ │ -

level (int) – Desired contrast level in the range of 0-255.

│ │ │ +

level (int) – Desired contrast level in the range of 0-255.

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ data(data)
│ │ │ @@ -1278,15 +1278,15 @@ │ │ │ │ │ │
│ │ │
│ │ │ display(image)
│ │ │

Renders a 24-bit RGB image to the Color OLED display.

│ │ │
│ │ │
Parameters
│ │ │ -

image (PIL.Image.Image) – The image to render.

│ │ │ +

image (PIL.Image.Image) – The image to render.

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ hide()
│ │ │ @@ -1303,21 +1303,21 @@ │ │ │
│ │ │ preprocess(image)
│ │ │

Provides a preprocessing facility (which may be overridden) whereby the supplied image is │ │ │ rotated according to the device’s rotate capability. If this method is │ │ │ overridden, it is important to call the super method.

│ │ │
│ │ │
Parameters
│ │ │ -

image (PIL.Image.Image) – An image to pre-process.

│ │ │ +

image (PIL.Image.Image) – An image to pre-process.

│ │ │
│ │ │
Returns
│ │ │

A new processed image.

│ │ │
│ │ │
Return type
│ │ │ -

PIL.Image.Image

│ │ │ +

PIL.Image.Image

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ show()
│ │ │ @@ -1335,24 +1335,24 @@ │ │ │

On creation, an initialization sequence is pumped to the │ │ │ display to properly configure it. Further control commands can then be │ │ │ called to affect the brightness and other settings.

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │
  • serial_interface – The serial interface (usually a │ │ │ -luma.core.interface.serial.spi instance) to delegate sending │ │ │ +luma.core.interface.serial.spi instance) to delegate sending │ │ │ data and commands through.

  • │ │ │ -
  • width (int) – The number of horizontal pixels (optional, defaults to 96).

  • │ │ │ -
  • height (int) – The number of vertical pixels (optional, defaults to 64).

  • │ │ │ -
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ +

  • width (int) – The number of horizontal pixels (optional, defaults to 96).

  • │ │ │ +
  • height (int) – The number of vertical pixels (optional, defaults to 64).

  • │ │ │ +
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ no rotation, 1 is rotate 90° clockwise, 2 is 180° rotation and 3 │ │ │ represents 270° rotation.

  • │ │ │ -
  • mode (str) – Supplying “1” or “RGB” effects a different rendering │ │ │ +

  • mode (str) – Supplying “1” or “RGB” effects a different rendering │ │ │ mechanism, either to monochrome or 4-bit greyscale.

  • │ │ │ -
  • framebuffer (str) – Framebuffering strategy, currently instances of │ │ │ +

  • framebuffer (str) – Framebuffering strategy, currently instances of │ │ │ diff_to_previous or full_frame are only supported

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │

New in version 3.4.0.

│ │ │
│ │ │ @@ -1360,20 +1360,20 @@ │ │ │
│ │ │ capabilities(width, height, rotate, mode='1')
│ │ │

Assigns attributes such as width, height, size and │ │ │ bounding_box correctly oriented from the supplied parameters.

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │ -
  • width (int) – The device width.

  • │ │ │ -
  • height (int) – The device height.

  • │ │ │ -
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ +

  • width (int) – The device width.

  • │ │ │ +
  • height (int) – The device height.

  • │ │ │ +
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ no rotation, 1 is rotate 90° clockwise, 2 is 180° rotation and 3 │ │ │ represents 270° rotation.

  • │ │ │ -
  • mode (str) – The supported color model, one of "1", "RGB" or │ │ │ +

  • mode (str) – The supported color model, one of "1", "RGB" or │ │ │ "RGBA" only.

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ @@ -1406,15 +1406,15 @@ │ │ │ contrast(level) │ │ │

Switches the display contrast to the desired level, in the range │ │ │ 0-255. Note that setting the level to a low (or zero) value will │ │ │ not necessarily dim the display to nearly off. In other words, │ │ │ this method is NOT suitable for fade-in/out animation.

│ │ │
│ │ │
Parameters
│ │ │ -

level (int) – Desired contrast level in the range of 0-255.

│ │ │ +

level (int) – Desired contrast level in the range of 0-255.

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ data(data)
│ │ │ @@ -1427,15 +1427,15 @@ │ │ │ display(image) │ │ │

Takes a 1-bit monochrome or 24-bit RGB image and renders it │ │ │ to the greyscale OLED display. RGB pixels are converted to 4-bit │ │ │ greyscale values using a simplified Luma calculation, based on │ │ │ Y’=0.299R’+0.587G’+0.114B’.

│ │ │
│ │ │
Parameters
│ │ │ -

image (PIL.Image.Image) – The image to render.

│ │ │ +

image (PIL.Image.Image) – The image to render.

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ hide()
│ │ │ @@ -1452,21 +1452,21 @@ │ │ │
│ │ │ preprocess(image)
│ │ │

Provides a preprocessing facility (which may be overridden) whereby the supplied image is │ │ │ rotated according to the device’s rotate capability. If this method is │ │ │ overridden, it is important to call the super method.

│ │ │
│ │ │
Parameters
│ │ │ -

image (PIL.Image.Image) – An image to pre-process.

│ │ │ +

image (PIL.Image.Image) – An image to pre-process.

│ │ │
│ │ │
Returns
│ │ │

A new processed image.

│ │ │
│ │ │
Return type
│ │ │ -

PIL.Image.Image

│ │ │ +

PIL.Image.Image

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ show()
│ │ │ @@ -1488,31 +1488,31 @@ │ │ │ designed to match the grid structure of the weh displays (see note below).

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │
  • serial_interface – The serial interface (usually a │ │ │ luma.core.interface.serial.parallel instance) to delegate sending │ │ │ data and commands through.

  • │ │ │ -
  • width (int) – The number of characters that can be displayed on a single line. │ │ │ +

  • width (int) – The number of characters that can be displayed on a single line. │ │ │ Example: the weh001602a has a width of 16 characters.

  • │ │ │ -
  • height (int) – The number of lines the display has. Example: the weh001602a │ │ │ +

  • height (int) – The number of lines the display has. Example: the weh001602a │ │ │ has a height of 2 lines.

  • │ │ │ -
  • undefined (str) – The character to display if the font doesn’t contain │ │ │ +

  • undefined (str) – The character to display if the font doesn’t contain │ │ │ the requested character

  • │ │ │ -
  • font (PIL.ImageFont) – Allows you to override the internal font by passing in an alternate

  • │ │ │ -
  • default_table (int) – Select one of the ws0010’s four embedded font tables │ │ │ +

  • font (PIL.ImageFont) – Allows you to override the internal font by passing in an alternate

  • │ │ │ +
  • default_table (int) – Select one of the ws0010’s four embedded font tables │ │ │ (see ws0010 documentation)

  • │ │ │
  • embedded_font (str '5x8' or '5x10') – Select the size of the embedded font to use. Allowed │ │ │ sizes are 5x8 (default) and 5x10

  • │ │ │ -
  • exec_time (float) – Time in seconds to wait for a command to complete. │ │ │ +

  • exec_time (float) – Time in seconds to wait for a command to complete. │ │ │ Default is 50 μs (1e-6 * 50)

  • │ │ │ -
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ +

  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ no rotation, 1 is rotate 90° clockwise, 2 is 180° rotation and 3 │ │ │ represents 270° rotation.

  • │ │ │ -
  • framebuffer (str) – Framebuffering strategy, currently values of │ │ │ +

  • framebuffer (str) – Framebuffering strategy, currently values of │ │ │ diff_to_previous or full_frame are only supported.

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │

New in version 3.6.0.

│ │ │
│ │ │ @@ -1520,20 +1520,20 @@ │ │ │
│ │ │ capabilities(width, height, rotate, mode='1')
│ │ │

Assigns attributes such as width, height, size and │ │ │ bounding_box correctly oriented from the supplied parameters.

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │ -
  • width (int) – The device width.

  • │ │ │ -
  • height (int) – The device height.

  • │ │ │ -
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ +

  • width (int) – The device width.

  • │ │ │ +
  • height (int) – The device height.

  • │ │ │ +
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ no rotation, 1 is rotate 90° clockwise, 2 is 180° rotation and 3 │ │ │ represents 270° rotation.

  • │ │ │ -
  • mode (str) – The supported color model, one of "1", "RGB" or │ │ │ +

  • mode (str) – The supported color model, one of "1", "RGB" or │ │ │ "RGBA" only.

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ @@ -1559,18 +1559,18 @@ │ │ │ command(*cmd, exec_time=None, only_low_bits=False) │ │ │

Sends a command or sequence of commands through to the serial interface. │ │ │ If operating in four bit mode, expands each command from one byte │ │ │ values (8 bits) to two nibble values (4 bits each)

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │ -
  • cmd (int) – A spread of commands.

  • │ │ │ -
  • exec_time (float) – Amount of time to wait for the command to finish │ │ │ +

  • cmd (int) – A spread of commands.

  • │ │ │ +
  • exec_time (float) – Amount of time to wait for the command to finish │ │ │ execution. If not provided, the device default will be used instead

  • │ │ │ -
  • only_low_bits (bool) – If True, only the lowest four bits of the command │ │ │ +

  • only_low_bits (bool) – If True, only the lowest four bits of the command │ │ │ will be sent. This is necessary on some devices during initialization

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ @@ -1578,47 +1578,47 @@ │ │ │ contrast(level) │ │ │

Switches the display contrast to the desired level, in the range │ │ │ 0-255. Note that setting the level to a low (or zero) value will │ │ │ not necessarily dim the display to nearly off. In other words, │ │ │ this method is NOT suitable for fade-in/out animation.

│ │ │
│ │ │
Parameters
│ │ │ -

level (int) – Desired contrast level in the range of 0-255.

│ │ │ +

level (int) – Desired contrast level in the range of 0-255.

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ data(data)
│ │ │

Sends a sequence of bytes through to the serial interface. │ │ │ If operating in four bit mode, expands each byte from a single │ │ │ value (8 bits) to two nibble values (4 bits each)

│ │ │
│ │ │
Parameters
│ │ │ -

data (list) – a sequence of bytes to send to the display

│ │ │ +

data (list) – a sequence of bytes to send to the display

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ display(image)
│ │ │ -

Takes a 1-bit PIL.Image and dumps it to the ws0010 │ │ │ +

Takes a 1-bit PIL.Image and dumps it to the ws0010 │ │ │ OLED display.

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ get_font(ft)
│ │ │

Load one of the devices embedded fonts by its index value or name and │ │ │ return it

│ │ │
│ │ │
Parameters
│ │ │ -

val (int or str) – The index or the name of the font to return

│ │ │ +

val (int or str) – The index or the name of the font to return

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ hide()
│ │ │ @@ -1635,21 +1635,21 @@ │ │ │
│ │ │ preprocess(image)
│ │ │

Provides a preprocessing facility (which may be overridden) whereby the supplied image is │ │ │ rotated according to the device’s rotate capability. If this method is │ │ │ overridden, it is important to call the super method.

│ │ │
│ │ │
Parameters
│ │ │ -

image (PIL.Image.Image) – An image to pre-process.

│ │ │ +

image (PIL.Image.Image) – An image to pre-process.

│ │ │
│ │ │
Returns
│ │ │

A new processed image.

│ │ │
│ │ │
Return type
│ │ │ -

PIL.Image.Image

│ │ │ +

PIL.Image.Image

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ show()
│ │ │ @@ -1666,67 +1666,67 @@ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ class luma.oled.device.ws0010(serial_interface=None, width=100, height=16, undefined='_', font=None, selected_font=0, exec_time=4.9999999999999996e-05, rotate=0, framebuffer=None, const=<class 'luma.oled.const.ws0010'>, **kwargs)[source]
│ │ │ -

Bases: parallel_device, character, __framebuffer_mixin

│ │ │ +

Bases: parallel_device, character, __framebuffer_mixin

│ │ │

Serial interface to a monochrome Winstar WS0010 OLED display. This │ │ │ interface will work with most ws0010 powered devices including the weg010016.

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │
  • serial_interface – The serial interface (usually a │ │ │ luma.core.interface.serial.parallel instance) to delegate sending │ │ │ data and commands through.

  • │ │ │ -
  • width (int) – The number of pixels laid out horizontally.

  • │ │ │ -
  • height (int) – The number of pixels laid out vertically.

  • │ │ │ -
  • undefined (str) – The character to display if the font doesn’t contain │ │ │ +

  • width (int) – The number of pixels laid out horizontally.

  • │ │ │ +
  • height (int) – The number of pixels laid out vertically.

  • │ │ │ +
  • undefined (str) – The character to display if the font doesn’t contain │ │ │ the requested character

  • │ │ │ -
  • font (PIL.ImageFont) – Allows you to override the internal font by passing in an alternate

  • │ │ │ -
  • selected_font (int or str) – Select one of the ws0010’s embedded font tables (see │ │ │ +

  • font (PIL.ImageFont) – Allows you to override the internal font by passing in an alternate

  • │ │ │ +
  • selected_font (int or str) – Select one of the ws0010’s embedded font tables (see │ │ │ note). Can be selected by number or name. Default is ‘FT00’ │ │ │ (English Japanese).

  • │ │ │ -
  • exec_time (float) – Time in seconds to wait for a command to complete. │ │ │ +

  • exec_time (float) – Time in seconds to wait for a command to complete. │ │ │ Default is 50 μs (1e-6 * 50) which is enough for all ws0010 commands.

  • │ │ │ -
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ +

  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ no rotation, 1 is rotate 90° clockwise, 2 is 180° rotation and 3 │ │ │ represents 270° rotation.

  • │ │ │ -
  • framebuffer (str) – Framebuffering strategy, currently values of │ │ │ +

  • framebuffer (str) – Framebuffering strategy, currently values of │ │ │ diff_to_previous or full_frame are only supported.

  • │ │ │
│ │ │
│ │ │
│ │ │

To place text on the display, simply assign the text to the ‘text’ │ │ │ instance variable:

│ │ │
p = parallel(RS=7, E=8, PINS=[25,24,23,18])
│ │ │  my_display = ws0010(p, selected_font='FT01')
│ │ │  my_display.text = 'WS0010 Display\nFont FT01 5x8'
│ │ │  
│ │ │
│ │ │

For more details on how to use the ‘text’ interface see │ │ │ -luma.core.virtual.character

│ │ │ +luma.core.virtual.character

│ │ │
│ │ │

New in version 3.6.0.

│ │ │
│ │ │
│ │ │
│ │ │ capabilities(width, height, rotate, mode='1')
│ │ │

Assigns attributes such as width, height, size and │ │ │ bounding_box correctly oriented from the supplied parameters.

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │ -
  • width (int) – The device width.

  • │ │ │ -
  • height (int) – The device height.

  • │ │ │ -
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ +

  • width (int) – The device width.

  • │ │ │ +
  • height (int) – The device height.

  • │ │ │ +
  • rotate (int) – An integer value of 0 (default), 1, 2 or 3 only, where 0 is │ │ │ no rotation, 1 is rotate 90° clockwise, 2 is 180° rotation and 3 │ │ │ represents 270° rotation.

  • │ │ │ -
  • mode (str) – The supported color model, one of "1", "RGB" or │ │ │ +

  • mode (str) – The supported color model, one of "1", "RGB" or │ │ │ "RGBA" only.

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ @@ -1752,18 +1752,18 @@ │ │ │ command(*cmd, exec_time=None, only_low_bits=False) │ │ │

Sends a command or sequence of commands through to the serial interface. │ │ │ If operating in four bit mode, expands each command from one byte │ │ │ values (8 bits) to two nibble values (4 bits each)

│ │ │
│ │ │
Parameters
│ │ │
    │ │ │ -
  • cmd (int) – A spread of commands.

  • │ │ │ -
  • exec_time (float) – Amount of time to wait for the command to finish │ │ │ +

  • cmd (int) – A spread of commands.

  • │ │ │ +
  • exec_time (float) – Amount of time to wait for the command to finish │ │ │ execution. If not provided, the device default will be used instead

  • │ │ │ -
  • only_low_bits (bool) – If True, only the lowest four bits of the command │ │ │ +

  • only_low_bits (bool) – If True, only the lowest four bits of the command │ │ │ will be sent. This is necessary on some devices during initialization

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ @@ -1771,47 +1771,47 @@ │ │ │ contrast(level) │ │ │

Switches the display contrast to the desired level, in the range │ │ │ 0-255. Note that setting the level to a low (or zero) value will │ │ │ not necessarily dim the display to nearly off. In other words, │ │ │ this method is NOT suitable for fade-in/out animation.

│ │ │
│ │ │
Parameters
│ │ │ -

level (int) – Desired contrast level in the range of 0-255.

│ │ │ +

level (int) – Desired contrast level in the range of 0-255.

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ data(data)
│ │ │

Sends a sequence of bytes through to the serial interface. │ │ │ If operating in four bit mode, expands each byte from a single │ │ │ value (8 bits) to two nibble values (4 bits each)

│ │ │
│ │ │
Parameters
│ │ │ -

data (list) – a sequence of bytes to send to the display

│ │ │ +

data (list) – a sequence of bytes to send to the display

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ display(image)[source]
│ │ │ -

Takes a 1-bit PIL.Image and dumps it to the ws0010 │ │ │ +

Takes a 1-bit PIL.Image and dumps it to the ws0010 │ │ │ OLED display.

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ get_font(ft)[source]
│ │ │

Load one of the devices embedded fonts by its index value or name and │ │ │ return it

│ │ │
│ │ │
Parameters
│ │ │ -

val (int or str) – The index or the name of the font to return

│ │ │ +

val (int or str) – The index or the name of the font to return

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ hide()
│ │ │ @@ -1828,21 +1828,21 @@ │ │ │
│ │ │ preprocess(image)
│ │ │

Provides a preprocessing facility (which may be overridden) whereby the supplied image is │ │ │ rotated according to the device’s rotate capability. If this method is │ │ │ overridden, it is important to call the super method.

│ │ │
│ │ │
Parameters
│ │ │ -

image (PIL.Image.Image) – An image to pre-process.

│ │ │ +

image (PIL.Image.Image) – An image to pre-process.

│ │ │
│ │ │
Returns
│ │ │

A new processed image.

│ │ │
│ │ │
Return type
│ │ │ -

PIL.Image.Image

│ │ │ +

PIL.Image.Image

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ show()
│ │ │ ├── html2text {} │ │ │ │ @@ -163,30 +163,30 @@ │ │ │ │ > "luma.oled.device.ws0010" [arrowsize=0.5,style="setlinewidth(0.5)"]; │ │ │ │ "luma.core.virtual.character" -> "luma.oled.device.ws0010" │ │ │ │ [arrowsize=0.5,style="setlinewidth(0.5)"]; } │ │ │ │ ********** _ll_uu_mm_aa_.._oo_ll_ee_dd_.._dd_ee_vv_ii_cc_ee_?¶ ********** │ │ │ │ Collection of serial interfaces to OLED devices. │ │ │ │ ccllaassss luma.oled.device.sh1106(sseerriiaall__iinntteerrffaaccee==NNoonnee, wwiiddtthh==112288, hheeiigghhtt==6644, │ │ │ │ rroottaattee==00, ****kkwwaarrggss)_[_s_o_u_r_c_e_]_¶ │ │ │ │ - Bases: _d_e_v_i_c_e │ │ │ │ + Bases: device │ │ │ │ Serial interface to a monochrome SH1106 OLED display. │ │ │ │ On creation, an initialization sequence is pumped to the display to │ │ │ │ properly configure it. Further control commands can then be called to │ │ │ │ affect the brightness and other settings. │ │ │ │ capabilities(wwiiddtthh, hheeiigghhtt, rroottaattee, mmooddee==''11'')_¶ │ │ │ │ Assigns attributes such as width, height, size and bounding_box │ │ │ │ correctly oriented from the supplied parameters. │ │ │ │ Parameters │ │ │ │ - * wwiiddtthh (_ii_nn_tt) – The device width. │ │ │ │ - * hheeiigghhtt (_ii_nn_tt) – The device height. │ │ │ │ - * rroottaattee (_ii_nn_tt) – An integer value of 0 (default), 1, 2 or │ │ │ │ + * wwiiddtthh (iinntt) – The device width. │ │ │ │ + * hheeiigghhtt (iinntt) – The device height. │ │ │ │ + * rroottaattee (iinntt) – An integer value of 0 (default), 1, 2 or │ │ │ │ 3 only, where 0 is no rotation, 1 is rotate 90° │ │ │ │ clockwise, 2 is 180° rotation and 3 represents 270° │ │ │ │ rotation. │ │ │ │ - * mmooddee (_ss_tt_rr) – The supported color model, one of "1", │ │ │ │ + * mmooddee (ssttrr) – The supported color model, one of "1", │ │ │ │ "RGB" or "RGBA" only. │ │ │ │ cleanup()_¶ │ │ │ │ Attempt to switch the device off or put into low power mode (this │ │ │ │ helps prolong the life of the device), clear the screen and close │ │ │ │ resources associated with the underlying serial interface. │ │ │ │ If persist is True, the device will not be switched off. │ │ │ │ This is a managed function, which is called when the python │ │ │ │ @@ -199,68 +199,68 @@ │ │ │ │ serial interface. │ │ │ │ contrast(lleevveell)_¶ │ │ │ │ Switches the display contrast to the desired level, in the range 0- │ │ │ │ 255. Note that setting the level to a low (or zero) value will not │ │ │ │ necessarily dim the display to nearly off. In other words, this │ │ │ │ method is NNOOTT suitable for fade-in/out animation. │ │ │ │ Parameters │ │ │ │ - lleevveell (_ii_nn_tt) – Desired contrast level in the range of 0-255. │ │ │ │ + lleevveell (iinntt) – Desired contrast level in the range of 0-255. │ │ │ │ data(ddaattaa)_¶ │ │ │ │ Sends a data byte or sequence of data bytes through to the │ │ │ │ delegated serial interface. │ │ │ │ display(iimmaaggee)_[_s_o_u_r_c_e_]_¶ │ │ │ │ - Takes a 1-bit _P_I_L_._I_m_a_g_e and dumps it to the SH1106 OLED display. │ │ │ │ + Takes a 1-bit PIL.Image and dumps it to the SH1106 OLED display. │ │ │ │ Parameters │ │ │ │ - iimmaaggee (_P_I_L_._I_m_a_g_e) – Image to display. │ │ │ │ + iimmaaggee (PIL.Image) – Image to display. │ │ │ │ hide()_¶ │ │ │ │ Switches the display mode OFF, putting the device in low-power │ │ │ │ sleep mode. │ │ │ │ preprocess(iimmaaggee)_¶ │ │ │ │ Provides a preprocessing facility (which may be overridden) whereby │ │ │ │ the supplied image is rotated according to the device’s rotate │ │ │ │ capability. If this method is overridden, it is important to call │ │ │ │ the super method. │ │ │ │ Parameters │ │ │ │ - iimmaaggee (_PP_II_LL_.._II_mm_aa_gg_ee_.._II_mm_aa_gg_ee) – An image to pre-process. │ │ │ │ + iimmaaggee (PPIILL..IImmaaggee..IImmaaggee) – An image to pre-process. │ │ │ │ Returns │ │ │ │ A new processed image. │ │ │ │ Return type │ │ │ │ - _P_I_L_._I_m_a_g_e_._I_m_a_g_e │ │ │ │ + PIL.Image.Image │ │ │ │ show()_¶ │ │ │ │ Sets the display mode ON, waking the device out of a prior low- │ │ │ │ power sleep mode. │ │ │ │ ccllaassss luma.oled.device.ssd1306(sseerriiaall__iinntteerrffaaccee==NNoonnee, wwiiddtthh==112288, hheeiigghhtt==6644, │ │ │ │ rroottaattee==00, ****kkwwaarrggss)_[_s_o_u_r_c_e_]_¶ │ │ │ │ - Bases: _d_e_v_i_c_e │ │ │ │ + Bases: device │ │ │ │ Serial interface to a monochrome SSD1306 OLED display. │ │ │ │ On creation, an initialization sequence is pumped to the display to │ │ │ │ properly configure it. Further control commands can then be called to │ │ │ │ affect the brightness and other settings. │ │ │ │ Parameters │ │ │ │ * sseerriiaall__iinntteerrffaaccee – The serial interface (usually a │ │ │ │ - _l_u_m_a_._c_o_r_e_._i_n_t_e_r_f_a_c_e_._s_e_r_i_a_l_._i_2_c instance) to delegate sending │ │ │ │ + luma.core.interface.serial.i2c instance) to delegate sending │ │ │ │ data and commands through. │ │ │ │ - * wwiiddtthh (_ii_nn_tt) – The number of horizontal pixels (optional, │ │ │ │ + * wwiiddtthh (iinntt) – The number of horizontal pixels (optional, │ │ │ │ defaults to 128). │ │ │ │ - * hheeiigghhtt (_ii_nn_tt) – The number of vertical pixels (optional, │ │ │ │ + * hheeiigghhtt (iinntt) – The number of vertical pixels (optional, │ │ │ │ defaults to 64). │ │ │ │ - * rroottaattee (_ii_nn_tt) – An integer value of 0 (default), 1, 2 or 3 │ │ │ │ + * rroottaattee (iinntt) – An integer value of 0 (default), 1, 2 or 3 │ │ │ │ only, where 0 is no rotation, 1 is rotate 90° clockwise, 2 is │ │ │ │ 180° rotation and 3 represents 270° rotation. │ │ │ │ capabilities(wwiiddtthh, hheeiigghhtt, rroottaattee, mmooddee==''11'')_¶ │ │ │ │ Assigns attributes such as width, height, size and bounding_box │ │ │ │ correctly oriented from the supplied parameters. │ │ │ │ Parameters │ │ │ │ - * wwiiddtthh (_ii_nn_tt) – The device width. │ │ │ │ - * hheeiigghhtt (_ii_nn_tt) – The device height. │ │ │ │ - * rroottaattee (_ii_nn_tt) – An integer value of 0 (default), 1, 2 or │ │ │ │ + * wwiiddtthh (iinntt) – The device width. │ │ │ │ + * hheeiigghhtt (iinntt) – The device height. │ │ │ │ + * rroottaattee (iinntt) – An integer value of 0 (default), 1, 2 or │ │ │ │ 3 only, where 0 is no rotation, 1 is rotate 90° │ │ │ │ clockwise, 2 is 180° rotation and 3 represents 270° │ │ │ │ rotation. │ │ │ │ - * mmooddee (_ss_tt_rr) – The supported color model, one of "1", │ │ │ │ + * mmooddee (ssttrr) – The supported color model, one of "1", │ │ │ │ "RGB" or "RGBA" only. │ │ │ │ cleanup()_¶ │ │ │ │ Attempt to switch the device off or put into low power mode (this │ │ │ │ helps prolong the life of the device), clear the screen and close │ │ │ │ resources associated with the underlying serial interface. │ │ │ │ If persist is True, the device will not be switched off. │ │ │ │ This is a managed function, which is called when the python │ │ │ │ @@ -273,69 +273,69 @@ │ │ │ │ serial interface. │ │ │ │ contrast(lleevveell)_¶ │ │ │ │ Switches the display contrast to the desired level, in the range 0- │ │ │ │ 255. Note that setting the level to a low (or zero) value will not │ │ │ │ necessarily dim the display to nearly off. In other words, this │ │ │ │ method is NNOOTT suitable for fade-in/out animation. │ │ │ │ Parameters │ │ │ │ - lleevveell (_ii_nn_tt) – Desired contrast level in the range of 0-255. │ │ │ │ + lleevveell (iinntt) – Desired contrast level in the range of 0-255. │ │ │ │ data(ddaattaa)_¶ │ │ │ │ Sends a data byte or sequence of data bytes through to the │ │ │ │ delegated serial interface. │ │ │ │ display(iimmaaggee)_[_s_o_u_r_c_e_]_¶ │ │ │ │ - Takes a 1-bit _P_I_L_._I_m_a_g_e and dumps it to the OLED display. │ │ │ │ + Takes a 1-bit PIL.Image and dumps it to the OLED display. │ │ │ │ Parameters │ │ │ │ - iimmaaggee (_P_I_L_._I_m_a_g_e) – Image to display. │ │ │ │ + iimmaaggee (PIL.Image) – Image to display. │ │ │ │ hide()_¶ │ │ │ │ Switches the display mode OFF, putting the device in low-power │ │ │ │ sleep mode. │ │ │ │ preprocess(iimmaaggee)_¶ │ │ │ │ Provides a preprocessing facility (which may be overridden) whereby │ │ │ │ the supplied image is rotated according to the device’s rotate │ │ │ │ capability. If this method is overridden, it is important to call │ │ │ │ the super method. │ │ │ │ Parameters │ │ │ │ - iimmaaggee (_PP_II_LL_.._II_mm_aa_gg_ee_.._II_mm_aa_gg_ee) – An image to pre-process. │ │ │ │ + iimmaaggee (PPIILL..IImmaaggee..IImmaaggee) – An image to pre-process. │ │ │ │ Returns │ │ │ │ A new processed image. │ │ │ │ Return type │ │ │ │ - _P_I_L_._I_m_a_g_e_._I_m_a_g_e │ │ │ │ + PIL.Image.Image │ │ │ │ show()_¶ │ │ │ │ Sets the display mode ON, waking the device out of a prior low- │ │ │ │ power sleep mode. │ │ │ │ ccllaassss luma.oled.device.ssd1309(sseerriiaall__iinntteerrffaaccee==NNoonnee, wwiiddtthh==112288, hheeiigghhtt==6644, │ │ │ │ rroottaattee==00, ****kkwwaarrggss)_[_s_o_u_r_c_e_]_¶ │ │ │ │ Bases: _s_s_d_1_3_0_6 │ │ │ │ Serial interface to a monochrome SSD1309 OLED display. │ │ │ │ On creation, an initialization sequence is pumped to the display to │ │ │ │ properly configure it. Further control commands can then be called to │ │ │ │ affect the brightness and other settings. │ │ │ │ Parameters │ │ │ │ * sseerriiaall__iinntteerrffaaccee – The serial interface (usually a │ │ │ │ - _l_u_m_a_._c_o_r_e_._i_n_t_e_r_f_a_c_e_._s_e_r_i_a_l_._s_p_i instance) to delegate sending │ │ │ │ + luma.core.interface.serial.spi instance) to delegate sending │ │ │ │ data and commands through. │ │ │ │ - * wwiiddtthh (_ii_nn_tt) – The number of horizontal pixels (optional, │ │ │ │ + * wwiiddtthh (iinntt) – The number of horizontal pixels (optional, │ │ │ │ defaults to 128). │ │ │ │ - * hheeiigghhtt (_ii_nn_tt) – The number of vertical pixels (optional, │ │ │ │ + * hheeiigghhtt (iinntt) – The number of vertical pixels (optional, │ │ │ │ defaults to 64). │ │ │ │ - * rroottaattee (_ii_nn_tt) – An integer value of 0 (default), 1, 2 or 3 │ │ │ │ + * rroottaattee (iinntt) – An integer value of 0 (default), 1, 2 or 3 │ │ │ │ only, where 0 is no rotation, 1 is rotate 90° clockwise, 2 is │ │ │ │ 180° rotation and 3 represents 270° rotation. │ │ │ │ New in version 3.1.0. │ │ │ │ capabilities(wwiiddtthh, hheeiigghhtt, rroottaattee, mmooddee==''11'')_¶ │ │ │ │ Assigns attributes such as width, height, size and bounding_box │ │ │ │ correctly oriented from the supplied parameters. │ │ │ │ Parameters │ │ │ │ - * wwiiddtthh (_ii_nn_tt) – The device width. │ │ │ │ - * hheeiigghhtt (_ii_nn_tt) – The device height. │ │ │ │ - * rroottaattee (_ii_nn_tt) – An integer value of 0 (default), 1, 2 or │ │ │ │ + * wwiiddtthh (iinntt) – The device width. │ │ │ │ + * hheeiigghhtt (iinntt) – The device height. │ │ │ │ + * rroottaattee (iinntt) – An integer value of 0 (default), 1, 2 or │ │ │ │ 3 only, where 0 is no rotation, 1 is rotate 90° │ │ │ │ clockwise, 2 is 180° rotation and 3 represents 270° │ │ │ │ rotation. │ │ │ │ - * mmooddee (_ss_tt_rr) – The supported color model, one of "1", │ │ │ │ + * mmooddee (ssttrr) – The supported color model, one of "1", │ │ │ │ "RGB" or "RGBA" only. │ │ │ │ cleanup()_¶ │ │ │ │ Attempt to switch the device off or put into low power mode (this │ │ │ │ helps prolong the life of the device), clear the screen and close │ │ │ │ resources associated with the underlying serial interface. │ │ │ │ If persist is True, the device will not be switched off. │ │ │ │ This is a managed function, which is called when the python │ │ │ │ @@ -348,73 +348,73 @@ │ │ │ │ serial interface. │ │ │ │ contrast(lleevveell)_¶ │ │ │ │ Switches the display contrast to the desired level, in the range 0- │ │ │ │ 255. Note that setting the level to a low (or zero) value will not │ │ │ │ necessarily dim the display to nearly off. In other words, this │ │ │ │ method is NNOOTT suitable for fade-in/out animation. │ │ │ │ Parameters │ │ │ │ - lleevveell (_ii_nn_tt) – Desired contrast level in the range of 0-255. │ │ │ │ + lleevveell (iinntt) – Desired contrast level in the range of 0-255. │ │ │ │ data(ddaattaa)_¶ │ │ │ │ Sends a data byte or sequence of data bytes through to the │ │ │ │ delegated serial interface. │ │ │ │ display(iimmaaggee)_¶ │ │ │ │ - Takes a 1-bit _P_I_L_._I_m_a_g_e and dumps it to the OLED display. │ │ │ │ + Takes a 1-bit PIL.Image and dumps it to the OLED display. │ │ │ │ Parameters │ │ │ │ - iimmaaggee (_P_I_L_._I_m_a_g_e) – Image to display. │ │ │ │ + iimmaaggee (PIL.Image) – Image to display. │ │ │ │ hide()_¶ │ │ │ │ Switches the display mode OFF, putting the device in low-power │ │ │ │ sleep mode. │ │ │ │ preprocess(iimmaaggee)_¶ │ │ │ │ Provides a preprocessing facility (which may be overridden) whereby │ │ │ │ the supplied image is rotated according to the device’s rotate │ │ │ │ capability. If this method is overridden, it is important to call │ │ │ │ the super method. │ │ │ │ Parameters │ │ │ │ - iimmaaggee (_PP_II_LL_.._II_mm_aa_gg_ee_.._II_mm_aa_gg_ee) – An image to pre-process. │ │ │ │ + iimmaaggee (PPIILL..IImmaaggee..IImmaaggee) – An image to pre-process. │ │ │ │ Returns │ │ │ │ A new processed image. │ │ │ │ Return type │ │ │ │ - _P_I_L_._I_m_a_g_e_._I_m_a_g_e │ │ │ │ + PIL.Image.Image │ │ │ │ show()_¶ │ │ │ │ Sets the display mode ON, waking the device out of a prior low- │ │ │ │ power sleep mode. │ │ │ │ ccllaassss luma.oled.device.ssd1322(sseerriiaall__iinntteerrffaaccee==NNoonnee, wwiiddtthh==225566, hheeiigghhtt==6644, │ │ │ │ rroottaattee==00, mmooddee==''RRGGBB'', ffrraammeebbuuffffeerr==NNoonnee, ****kkwwaarrggss)_[_s_o_u_r_c_e_]_¶ │ │ │ │ Bases: greyscale_device │ │ │ │ Serial interface to a 4-bit greyscale SSD1322 OLED display. │ │ │ │ On creation, an initialization sequence is pumped to the display to │ │ │ │ properly configure it. Further control commands can then be called to │ │ │ │ affect the brightness and other settings. │ │ │ │ Parameters │ │ │ │ * sseerriiaall__iinntteerrffaaccee – The serial interface (usually a │ │ │ │ - _l_u_m_a_._c_o_r_e_._i_n_t_e_r_f_a_c_e_._s_e_r_i_a_l_._s_p_i instance) to delegate sending │ │ │ │ + luma.core.interface.serial.spi instance) to delegate sending │ │ │ │ data and commands through. │ │ │ │ - * wwiiddtthh (_ii_nn_tt) – The number of horizontal pixels (optional, │ │ │ │ + * wwiiddtthh (iinntt) – The number of horizontal pixels (optional, │ │ │ │ defaults to 96). │ │ │ │ - * hheeiigghhtt (_ii_nn_tt) – The number of vertical pixels (optional, │ │ │ │ + * hheeiigghhtt (iinntt) – The number of vertical pixels (optional, │ │ │ │ defaults to 64). │ │ │ │ - * rroottaattee (_ii_nn_tt) – An integer value of 0 (default), 1, 2 or 3 │ │ │ │ + * rroottaattee (iinntt) – An integer value of 0 (default), 1, 2 or 3 │ │ │ │ only, where 0 is no rotation, 1 is rotate 90° clockwise, 2 is │ │ │ │ 180° rotation and 3 represents 270° rotation. │ │ │ │ - * mmooddee (_ss_tt_rr) – Supplying “1” or “RGB” effects a different │ │ │ │ + * mmooddee (ssttrr) – Supplying “1” or “RGB” effects a different │ │ │ │ rendering mechanism, either to monochrome or 4-bit greyscale. │ │ │ │ - * ffrraammeebbuuffffeerr (_ss_tt_rr) – Framebuffering strategy, currently │ │ │ │ + * ffrraammeebbuuffffeerr (ssttrr) – Framebuffering strategy, currently │ │ │ │ instances of diff_to_previous or full_frame are only │ │ │ │ supported │ │ │ │ capabilities(wwiiddtthh, hheeiigghhtt, rroottaattee, mmooddee==''11'')_¶ │ │ │ │ Assigns attributes such as width, height, size and bounding_box │ │ │ │ correctly oriented from the supplied parameters. │ │ │ │ Parameters │ │ │ │ - * wwiiddtthh (_ii_nn_tt) – The device width. │ │ │ │ - * hheeiigghhtt (_ii_nn_tt) – The device height. │ │ │ │ - * rroottaattee (_ii_nn_tt) – An integer value of 0 (default), 1, 2 or │ │ │ │ + * wwiiddtthh (iinntt) – The device width. │ │ │ │ + * hheeiigghhtt (iinntt) – The device height. │ │ │ │ + * rroottaattee (iinntt) – An integer value of 0 (default), 1, 2 or │ │ │ │ 3 only, where 0 is no rotation, 1 is rotate 90° │ │ │ │ clockwise, 2 is 180° rotation and 3 represents 270° │ │ │ │ rotation. │ │ │ │ - * mmooddee (_ss_tt_rr) – The supported color model, one of "1", │ │ │ │ + * mmooddee (ssttrr) – The supported color model, one of "1", │ │ │ │ "RGB" or "RGBA" only. │ │ │ │ cleanup()_¶ │ │ │ │ Attempt to switch the device off or put into low power mode (this │ │ │ │ helps prolong the life of the device), clear the screen and close │ │ │ │ resources associated with the underlying serial interface. │ │ │ │ If persist is True, the device will not be switched off. │ │ │ │ This is a managed function, which is called when the python │ │ │ │ @@ -428,60 +428,60 @@ │ │ │ │ through as data. │ │ │ │ contrast(lleevveell)_¶ │ │ │ │ Switches the display contrast to the desired level, in the range 0- │ │ │ │ 255. Note that setting the level to a low (or zero) value will not │ │ │ │ necessarily dim the display to nearly off. In other words, this │ │ │ │ method is NNOOTT suitable for fade-in/out animation. │ │ │ │ Parameters │ │ │ │ - lleevveell (_ii_nn_tt) – Desired contrast level in the range of 0-255. │ │ │ │ + lleevveell (iinntt) – Desired contrast level in the range of 0-255. │ │ │ │ data(ddaattaa)_¶ │ │ │ │ Sends a data byte or sequence of data bytes through to the │ │ │ │ delegated serial interface. │ │ │ │ display(iimmaaggee)_¶ │ │ │ │ Takes a 1-bit monochrome or 24-bit RGB image and renders it to the │ │ │ │ greyscale OLED display. RGB pixels are converted to 4-bit greyscale │ │ │ │ values using a simplified Luma calculation, based on │ │ │ │ YY?’==00..229999RR?’++00..558877GG?’++00..111144BB?’. │ │ │ │ Parameters │ │ │ │ - iimmaaggee (_PP_II_LL_.._II_mm_aa_gg_ee_.._II_mm_aa_gg_ee) – The image to render. │ │ │ │ + iimmaaggee (PPIILL..IImmaaggee..IImmaaggee) – The image to render. │ │ │ │ hide()_¶ │ │ │ │ Switches the display mode OFF, putting the device in low-power │ │ │ │ sleep mode. │ │ │ │ init_framebuffer(ffrraammeebbuuffffeerr)_¶ │ │ │ │ preprocess(iimmaaggee)_¶ │ │ │ │ Provides a preprocessing facility (which may be overridden) whereby │ │ │ │ the supplied image is rotated according to the device’s rotate │ │ │ │ capability. If this method is overridden, it is important to call │ │ │ │ the super method. │ │ │ │ Parameters │ │ │ │ - iimmaaggee (_PP_II_LL_.._II_mm_aa_gg_ee_.._II_mm_aa_gg_ee) – An image to pre-process. │ │ │ │ + iimmaaggee (PPIILL..IImmaaggee..IImmaaggee) – An image to pre-process. │ │ │ │ Returns │ │ │ │ A new processed image. │ │ │ │ Return type │ │ │ │ - _P_I_L_._I_m_a_g_e_._I_m_a_g_e │ │ │ │ + PIL.Image.Image │ │ │ │ show()_¶ │ │ │ │ Sets the display mode ON, waking the device out of a prior low- │ │ │ │ power sleep mode. │ │ │ │ ccllaassss luma.oled.device.ssd1322_nhd(sseerriiaall__iinntteerrffaaccee==NNoonnee, wwiiddtthh==112288, │ │ │ │ hheeiigghhtt==6644, rroottaattee==00, mmooddee==''RRGGBB'', │ │ │ │ ffrraammeebbuuffffeerr==<>, ****kkwwaarrggss)_[_s_o_u_r_c_e_]_¶ │ │ │ │ Bases: greyscale_device │ │ │ │ Similar to ssd1322 but several options are hard coded: width, height and │ │ │ │ frame buffer │ │ │ │ capabilities(wwiiddtthh, hheeiigghhtt, rroottaattee, mmooddee==''11'')_¶ │ │ │ │ Assigns attributes such as width, height, size and bounding_box │ │ │ │ correctly oriented from the supplied parameters. │ │ │ │ Parameters │ │ │ │ - * wwiiddtthh (_ii_nn_tt) – The device width. │ │ │ │ - * hheeiigghhtt (_ii_nn_tt) – The device height. │ │ │ │ - * rroottaattee (_ii_nn_tt) – An integer value of 0 (default), 1, 2 or │ │ │ │ + * wwiiddtthh (iinntt) – The device width. │ │ │ │ + * hheeiigghhtt (iinntt) – The device height. │ │ │ │ + * rroottaattee (iinntt) – An integer value of 0 (default), 1, 2 or │ │ │ │ 3 only, where 0 is no rotation, 1 is rotate 90° │ │ │ │ clockwise, 2 is 180° rotation and 3 represents 270° │ │ │ │ rotation. │ │ │ │ - * mmooddee (_ss_tt_rr) – The supported color model, one of "1", │ │ │ │ + * mmooddee (ssttrr) – The supported color model, one of "1", │ │ │ │ "RGB" or "RGBA" only. │ │ │ │ cleanup()_¶ │ │ │ │ Attempt to switch the device off or put into low power mode (this │ │ │ │ helps prolong the life of the device), clear the screen and close │ │ │ │ resources associated with the underlying serial interface. │ │ │ │ If persist is True, the device will not be switched off. │ │ │ │ This is a managed function, which is called when the python │ │ │ │ @@ -495,61 +495,61 @@ │ │ │ │ through as data. │ │ │ │ contrast(lleevveell)_¶ │ │ │ │ Switches the display contrast to the desired level, in the range 0- │ │ │ │ 255. Note that setting the level to a low (or zero) value will not │ │ │ │ necessarily dim the display to nearly off. In other words, this │ │ │ │ method is NNOOTT suitable for fade-in/out animation. │ │ │ │ Parameters │ │ │ │ - lleevveell (_ii_nn_tt) – Desired contrast level in the range of 0-255. │ │ │ │ + lleevveell (iinntt) – Desired contrast level in the range of 0-255. │ │ │ │ data(ddaattaa)_¶ │ │ │ │ Sends a data byte or sequence of data bytes through to the │ │ │ │ delegated serial interface. │ │ │ │ display(iimmaaggee)_[_s_o_u_r_c_e_]_¶ │ │ │ │ Takes a 1-bit monochrome or 24-bit RGB image and renders it to the │ │ │ │ greyscale OLED display. RGB pixels are converted to 8-bit greyscale │ │ │ │ values using a simplified Luma calculation, based on │ │ │ │ YY?’==00..229999RR?’++00..558877GG?’++00..111144BB?’. │ │ │ │ Parameters │ │ │ │ - iimmaaggee (_PP_II_LL_.._II_mm_aa_gg_ee_.._II_mm_aa_gg_ee) – the image to render │ │ │ │ + iimmaaggee (PPIILL..IImmaaggee..IImmaaggee) – the image to render │ │ │ │ hide()_¶ │ │ │ │ Switches the display mode OFF, putting the device in low-power │ │ │ │ sleep mode. │ │ │ │ init_framebuffer(ffrraammeebbuuffffeerr)_¶ │ │ │ │ preprocess(iimmaaggee)_¶ │ │ │ │ Provides a preprocessing facility (which may be overridden) whereby │ │ │ │ the supplied image is rotated according to the device’s rotate │ │ │ │ capability. If this method is overridden, it is important to call │ │ │ │ the super method. │ │ │ │ Parameters │ │ │ │ - iimmaaggee (_PP_II_LL_.._II_mm_aa_gg_ee_.._II_mm_aa_gg_ee) – An image to pre-process. │ │ │ │ + iimmaaggee (PPIILL..IImmaaggee..IImmaaggee) – An image to pre-process. │ │ │ │ Returns │ │ │ │ A new processed image. │ │ │ │ Return type │ │ │ │ - _P_I_L_._I_m_a_g_e_._I_m_a_g_e │ │ │ │ + PIL.Image.Image │ │ │ │ show()_¶ │ │ │ │ Sets the display mode ON, waking the device out of a prior low- │ │ │ │ power sleep mode. │ │ │ │ ccllaassss luma.oled.device.ssd1325(sseerriiaall__iinntteerrffaaccee==NNoonnee, wwiiddtthh==112288, hheeiigghhtt==6644, │ │ │ │ rroottaattee==00, mmooddee==''RRGGBB'', ffrraammeebbuuffffeerr==NNoonnee, ****kkwwaarrggss)_[_s_o_u_r_c_e_]_¶ │ │ │ │ Bases: greyscale_device │ │ │ │ Serial interface to a 4-bit greyscale SSD1325 OLED display. │ │ │ │ On creation, an initialization sequence is pumped to the display to │ │ │ │ properly configure it. Further control commands can then be called to │ │ │ │ affect the brightness and other settings. │ │ │ │ capabilities(wwiiddtthh, hheeiigghhtt, rroottaattee, mmooddee==''11'')_¶ │ │ │ │ Assigns attributes such as width, height, size and bounding_box │ │ │ │ correctly oriented from the supplied parameters. │ │ │ │ Parameters │ │ │ │ - * wwiiddtthh (_ii_nn_tt) – The device width. │ │ │ │ - * hheeiigghhtt (_ii_nn_tt) – The device height. │ │ │ │ - * rroottaattee (_ii_nn_tt) – An integer value of 0 (default), 1, 2 or │ │ │ │ + * wwiiddtthh (iinntt) – The device width. │ │ │ │ + * hheeiigghhtt (iinntt) – The device height. │ │ │ │ + * rroottaattee (iinntt) – An integer value of 0 (default), 1, 2 or │ │ │ │ 3 only, where 0 is no rotation, 1 is rotate 90° │ │ │ │ clockwise, 2 is 180° rotation and 3 represents 270° │ │ │ │ rotation. │ │ │ │ - * mmooddee (_ss_tt_rr) – The supported color model, one of "1", │ │ │ │ + * mmooddee (ssttrr) – The supported color model, one of "1", │ │ │ │ "RGB" or "RGBA" only. │ │ │ │ cleanup()_¶ │ │ │ │ Attempt to switch the device off or put into low power mode (this │ │ │ │ helps prolong the life of the device), clear the screen and close │ │ │ │ resources associated with the underlying serial interface. │ │ │ │ If persist is True, the device will not be switched off. │ │ │ │ This is a managed function, which is called when the python │ │ │ │ @@ -562,40 +562,40 @@ │ │ │ │ serial interface. │ │ │ │ contrast(lleevveell)_¶ │ │ │ │ Switches the display contrast to the desired level, in the range 0- │ │ │ │ 255. Note that setting the level to a low (or zero) value will not │ │ │ │ necessarily dim the display to nearly off. In other words, this │ │ │ │ method is NNOOTT suitable for fade-in/out animation. │ │ │ │ Parameters │ │ │ │ - lleevveell (_ii_nn_tt) – Desired contrast level in the range of 0-255. │ │ │ │ + lleevveell (iinntt) – Desired contrast level in the range of 0-255. │ │ │ │ data(ddaattaa)_¶ │ │ │ │ Sends a data byte or sequence of data bytes through to the │ │ │ │ delegated serial interface. │ │ │ │ display(iimmaaggee)_¶ │ │ │ │ Takes a 1-bit monochrome or 24-bit RGB image and renders it to the │ │ │ │ greyscale OLED display. RGB pixels are converted to 4-bit greyscale │ │ │ │ values using a simplified Luma calculation, based on │ │ │ │ YY?’==00..229999RR?’++00..558877GG?’++00..111144BB?’. │ │ │ │ Parameters │ │ │ │ - iimmaaggee (_PP_II_LL_.._II_mm_aa_gg_ee_.._II_mm_aa_gg_ee) – The image to render. │ │ │ │ + iimmaaggee (PPIILL..IImmaaggee..IImmaaggee) – The image to render. │ │ │ │ hide()_¶ │ │ │ │ Switches the display mode OFF, putting the device in low-power │ │ │ │ sleep mode. │ │ │ │ init_framebuffer(ffrraammeebbuuffffeerr)_¶ │ │ │ │ preprocess(iimmaaggee)_¶ │ │ │ │ Provides a preprocessing facility (which may be overridden) whereby │ │ │ │ the supplied image is rotated according to the device’s rotate │ │ │ │ capability. If this method is overridden, it is important to call │ │ │ │ the super method. │ │ │ │ Parameters │ │ │ │ - iimmaaggee (_PP_II_LL_.._II_mm_aa_gg_ee_.._II_mm_aa_gg_ee) – An image to pre-process. │ │ │ │ + iimmaaggee (PPIILL..IImmaaggee..IImmaaggee) – An image to pre-process. │ │ │ │ Returns │ │ │ │ A new processed image. │ │ │ │ Return type │ │ │ │ - _P_I_L_._I_m_a_g_e_._I_m_a_g_e │ │ │ │ + PIL.Image.Image │ │ │ │ show()_¶ │ │ │ │ Sets the display mode ON, waking the device out of a prior low- │ │ │ │ power sleep mode. │ │ │ │ ccllaassss luma.oled.device.ssd1327(sseerriiaall__iinntteerrffaaccee==NNoonnee, wwiiddtthh==112288, hheeiigghhtt==112288, │ │ │ │ rroottaattee==00, mmooddee==''RRGGBB'', ffrraammeebbuuffffeerr==NNoonnee, ****kkwwaarrggss)_[_s_o_u_r_c_e_]_¶ │ │ │ │ Bases: greyscale_device │ │ │ │ Serial interface to a 4-bit greyscale SSD1327 OLED display. │ │ │ │ @@ -603,21 +603,21 @@ │ │ │ │ properly configure it. Further control commands can then be called to │ │ │ │ affect the brightness and other settings. │ │ │ │ New in version 2.4.0. │ │ │ │ capabilities(wwiiddtthh, hheeiigghhtt, rroottaattee, mmooddee==''11'')_¶ │ │ │ │ Assigns attributes such as width, height, size and bounding_box │ │ │ │ correctly oriented from the supplied parameters. │ │ │ │ Parameters │ │ │ │ - * wwiiddtthh (_ii_nn_tt) – The device width. │ │ │ │ - * hheeiigghhtt (_ii_nn_tt) – The device height. │ │ │ │ - * rroottaattee (_ii_nn_tt) – An integer value of 0 (default), 1, 2 or │ │ │ │ + * wwiiddtthh (iinntt) – The device width. │ │ │ │ + * hheeiigghhtt (iinntt) – The device height. │ │ │ │ + * rroottaattee (iinntt) – An integer value of 0 (default), 1, 2 or │ │ │ │ 3 only, where 0 is no rotation, 1 is rotate 90° │ │ │ │ clockwise, 2 is 180° rotation and 3 represents 270° │ │ │ │ rotation. │ │ │ │ - * mmooddee (_ss_tt_rr) – The supported color model, one of "1", │ │ │ │ + * mmooddee (ssttrr) – The supported color model, one of "1", │ │ │ │ "RGB" or "RGBA" only. │ │ │ │ cleanup()_¶ │ │ │ │ Attempt to switch the device off or put into low power mode (this │ │ │ │ helps prolong the life of the device), clear the screen and close │ │ │ │ resources associated with the underlying serial interface. │ │ │ │ If persist is True, the device will not be switched off. │ │ │ │ This is a managed function, which is called when the python │ │ │ │ @@ -630,75 +630,75 @@ │ │ │ │ serial interface. │ │ │ │ contrast(lleevveell)_¶ │ │ │ │ Switches the display contrast to the desired level, in the range 0- │ │ │ │ 255. Note that setting the level to a low (or zero) value will not │ │ │ │ necessarily dim the display to nearly off. In other words, this │ │ │ │ method is NNOOTT suitable for fade-in/out animation. │ │ │ │ Parameters │ │ │ │ - lleevveell (_ii_nn_tt) – Desired contrast level in the range of 0-255. │ │ │ │ + lleevveell (iinntt) – Desired contrast level in the range of 0-255. │ │ │ │ data(ddaattaa)_¶ │ │ │ │ Sends a data byte or sequence of data bytes through to the │ │ │ │ delegated serial interface. │ │ │ │ display(iimmaaggee)_¶ │ │ │ │ Takes a 1-bit monochrome or 24-bit RGB image and renders it to the │ │ │ │ greyscale OLED display. RGB pixels are converted to 4-bit greyscale │ │ │ │ values using a simplified Luma calculation, based on │ │ │ │ YY?’==00..229999RR?’++00..558877GG?’++00..111144BB?’. │ │ │ │ Parameters │ │ │ │ - iimmaaggee (_PP_II_LL_.._II_mm_aa_gg_ee_.._II_mm_aa_gg_ee) – The image to render. │ │ │ │ + iimmaaggee (PPIILL..IImmaaggee..IImmaaggee) – The image to render. │ │ │ │ hide()_¶ │ │ │ │ Switches the display mode OFF, putting the device in low-power │ │ │ │ sleep mode. │ │ │ │ init_framebuffer(ffrraammeebbuuffffeerr)_¶ │ │ │ │ preprocess(iimmaaggee)_¶ │ │ │ │ Provides a preprocessing facility (which may be overridden) whereby │ │ │ │ the supplied image is rotated according to the device’s rotate │ │ │ │ capability. If this method is overridden, it is important to call │ │ │ │ the super method. │ │ │ │ Parameters │ │ │ │ - iimmaaggee (_PP_II_LL_.._II_mm_aa_gg_ee_.._II_mm_aa_gg_ee) – An image to pre-process. │ │ │ │ + iimmaaggee (PPIILL..IImmaaggee..IImmaaggee) – An image to pre-process. │ │ │ │ Returns │ │ │ │ A new processed image. │ │ │ │ Return type │ │ │ │ - _P_I_L_._I_m_a_g_e_._I_m_a_g_e │ │ │ │ + PIL.Image.Image │ │ │ │ show()_¶ │ │ │ │ Sets the display mode ON, waking the device out of a prior low- │ │ │ │ power sleep mode. │ │ │ │ ccllaassss luma.oled.device.ssd1331(sseerriiaall__iinntteerrffaaccee==NNoonnee, wwiiddtthh==9966, hheeiigghhtt==6644, │ │ │ │ rroottaattee==00, ffrraammeebbuuffffeerr==NNoonnee, ****kkwwaarrggss)_[_s_o_u_r_c_e_]_¶ │ │ │ │ Bases: color_device │ │ │ │ Serial interface to a 16-bit color (5-6-5 RGB) SSD1331 OLED display. │ │ │ │ On creation, an initialization sequence is pumped to the display to │ │ │ │ properly configure it. Further control commands can then be called to │ │ │ │ affect the brightness and other settings. │ │ │ │ Parameters │ │ │ │ * sseerriiaall__iinntteerrffaaccee – The serial interface (usually a │ │ │ │ - _l_u_m_a_._c_o_r_e_._i_n_t_e_r_f_a_c_e_._s_e_r_i_a_l_._s_p_i instance) to delegate sending │ │ │ │ + luma.core.interface.serial.spi instance) to delegate sending │ │ │ │ data and commands through. │ │ │ │ - * wwiiddtthh (_ii_nn_tt) – The number of horizontal pixels (optional, │ │ │ │ + * wwiiddtthh (iinntt) – The number of horizontal pixels (optional, │ │ │ │ defaults to 96). │ │ │ │ - * hheeiigghhtt (_ii_nn_tt) – The number of vertical pixels (optional, │ │ │ │ + * hheeiigghhtt (iinntt) – The number of vertical pixels (optional, │ │ │ │ defaults to 64). │ │ │ │ - * rroottaattee (_ii_nn_tt) – An integer value of 0 (default), 1, 2 or 3 │ │ │ │ + * rroottaattee (iinntt) – An integer value of 0 (default), 1, 2 or 3 │ │ │ │ only, where 0 is no rotation, 1 is rotate 90° clockwise, 2 is │ │ │ │ 180° rotation and 3 represents 270° rotation. │ │ │ │ - * ffrraammeebbuuffffeerr (_ss_tt_rr) – Framebuffering strategy, currently │ │ │ │ + * ffrraammeebbuuffffeerr (ssttrr) – Framebuffering strategy, currently │ │ │ │ instances of diff_to_previous or full_frame are only │ │ │ │ supported. │ │ │ │ capabilities(wwiiddtthh, hheeiigghhtt, rroottaattee, mmooddee==''11'')_¶ │ │ │ │ Assigns attributes such as width, height, size and bounding_box │ │ │ │ correctly oriented from the supplied parameters. │ │ │ │ Parameters │ │ │ │ - * wwiiddtthh (_ii_nn_tt) – The device width. │ │ │ │ - * hheeiigghhtt (_ii_nn_tt) – The device height. │ │ │ │ - * rroottaattee (_ii_nn_tt) – An integer value of 0 (default), 1, 2 or │ │ │ │ + * wwiiddtthh (iinntt) – The device width. │ │ │ │ + * hheeiigghhtt (iinntt) – The device height. │ │ │ │ + * rroottaattee (iinntt) – An integer value of 0 (default), 1, 2 or │ │ │ │ 3 only, where 0 is no rotation, 1 is rotate 90° │ │ │ │ clockwise, 2 is 180° rotation and 3 represents 270° │ │ │ │ rotation. │ │ │ │ - * mmooddee (_ss_tt_rr) – The supported color model, one of "1", │ │ │ │ + * mmooddee (ssttrr) – The supported color model, one of "1", │ │ │ │ "RGB" or "RGBA" only. │ │ │ │ cleanup()_¶ │ │ │ │ Attempt to switch the device off or put into low power mode (this │ │ │ │ helps prolong the life of the device), clear the screen and close │ │ │ │ resources associated with the underlying serial interface. │ │ │ │ If persist is True, the device will not be switched off. │ │ │ │ This is a managed function, which is called when the python │ │ │ │ @@ -711,80 +711,80 @@ │ │ │ │ serial interface. │ │ │ │ contrast(lleevveell)_[_s_o_u_r_c_e_]_¶ │ │ │ │ Switches the display contrast to the desired level, in the range 0- │ │ │ │ 255. Note that setting the level to a low (or zero) value will not │ │ │ │ necessarily dim the display to nearly off. In other words, this │ │ │ │ method is NNOOTT suitable for fade-in/out animation. │ │ │ │ Parameters │ │ │ │ - lleevveell (_ii_nn_tt) – Desired contrast level in the range of 0-255. │ │ │ │ + lleevveell (iinntt) – Desired contrast level in the range of 0-255. │ │ │ │ data(ddaattaa)_¶ │ │ │ │ Sends a data byte or sequence of data bytes through to the │ │ │ │ delegated serial interface. │ │ │ │ display(iimmaaggee)_¶ │ │ │ │ Renders a 24-bit RGB image to the Color OLED display. │ │ │ │ Parameters │ │ │ │ - iimmaaggee (_PP_II_LL_.._II_mm_aa_gg_ee_.._II_mm_aa_gg_ee) – The image to render. │ │ │ │ + iimmaaggee (PPIILL..IImmaaggee..IImmaaggee) – The image to render. │ │ │ │ hide()_¶ │ │ │ │ Switches the display mode OFF, putting the device in low-power │ │ │ │ sleep mode. │ │ │ │ init_framebuffer(ffrraammeebbuuffffeerr)_¶ │ │ │ │ preprocess(iimmaaggee)_¶ │ │ │ │ Provides a preprocessing facility (which may be overridden) whereby │ │ │ │ the supplied image is rotated according to the device’s rotate │ │ │ │ capability. If this method is overridden, it is important to call │ │ │ │ the super method. │ │ │ │ Parameters │ │ │ │ - iimmaaggee (_PP_II_LL_.._II_mm_aa_gg_ee_.._II_mm_aa_gg_ee) – An image to pre-process. │ │ │ │ + iimmaaggee (PPIILL..IImmaaggee..IImmaaggee) – An image to pre-process. │ │ │ │ Returns │ │ │ │ A new processed image. │ │ │ │ Return type │ │ │ │ - _P_I_L_._I_m_a_g_e_._I_m_a_g_e │ │ │ │ + PIL.Image.Image │ │ │ │ show()_¶ │ │ │ │ Sets the display mode ON, waking the device out of a prior low- │ │ │ │ power sleep mode. │ │ │ │ ccllaassss luma.oled.device.ssd1351(sseerriiaall__iinntteerrffaaccee==NNoonnee, wwiiddtthh==112288, hheeiigghhtt==112288, │ │ │ │ rroottaattee==00, ffrraammeebbuuffffeerr==NNoonnee, hh__ooffffsseett==00, vv__ooffffsseett==00, bbggrr==FFaallssee, ****kkwwaarrggss) │ │ │ │ _[_s_o_u_r_c_e_]_¶ │ │ │ │ Bases: color_device │ │ │ │ Serial interface to the 16-bit color (5-6-5 RGB) SSD1351 OLED display. │ │ │ │ On creation, an initialization sequence is pumped to the display to │ │ │ │ properly configure it. Further control commands can then be called to │ │ │ │ affect the brightness and other settings. │ │ │ │ Parameters │ │ │ │ * sseerriiaall__iinntteerrffaaccee – The serial interface (usually a │ │ │ │ - _l_u_m_a_._c_o_r_e_._i_n_t_e_r_f_a_c_e_._s_e_r_i_a_l_._s_p_i instance) to delegate sending │ │ │ │ + luma.core.interface.serial.spi instance) to delegate sending │ │ │ │ data and commands through. │ │ │ │ - * wwiiddtthh (_ii_nn_tt) – The number of horizontal pixels (optional, │ │ │ │ + * wwiiddtthh (iinntt) – The number of horizontal pixels (optional, │ │ │ │ defaults to 128). │ │ │ │ - * hheeiigghhtt (_ii_nn_tt) – The number of vertical pixels (optional, │ │ │ │ + * hheeiigghhtt (iinntt) – The number of vertical pixels (optional, │ │ │ │ defaults to 128). │ │ │ │ - * rroottaattee (_ii_nn_tt) – An integer value of 0 (default), 1, 2 or 3 │ │ │ │ + * rroottaattee (iinntt) – An integer value of 0 (default), 1, 2 or 3 │ │ │ │ only, where 0 is no rotation, 1 is rotate 90° clockwise, 2 is │ │ │ │ 180° rotation and 3 represents 270° rotation. │ │ │ │ - * ffrraammeebbuuffffeerr (_ss_tt_rr) – Framebuffering strategy, currently │ │ │ │ + * ffrraammeebbuuffffeerr (ssttrr) – Framebuffering strategy, currently │ │ │ │ instances of diff_to_previous or full_frame are only │ │ │ │ supported. │ │ │ │ - * bbggrr (_bb_oo_oo_ll) – Set to True if device pixels are BGR order │ │ │ │ + * bbggrr (bbooooll) – Set to True if device pixels are BGR order │ │ │ │ (rather than RGB). │ │ │ │ - * hh__ooffffsseett (_ii_nn_tt) – Horizontal offset (in pixels) of screen to │ │ │ │ + * hh__ooffffsseett (iinntt) – Horizontal offset (in pixels) of screen to │ │ │ │ device memory (default: 0) │ │ │ │ * vv__ooffffsseett – Vertical offset (in pixels) of screen to device │ │ │ │ memory (default: 0) │ │ │ │ New in version 2.3.0. │ │ │ │ capabilities(wwiiddtthh, hheeiigghhtt, rroottaattee, mmooddee==''11'')_¶ │ │ │ │ Assigns attributes such as width, height, size and bounding_box │ │ │ │ correctly oriented from the supplied parameters. │ │ │ │ Parameters │ │ │ │ - * wwiiddtthh (_ii_nn_tt) – The device width. │ │ │ │ - * hheeiigghhtt (_ii_nn_tt) – The device height. │ │ │ │ - * rroottaattee (_ii_nn_tt) – An integer value of 0 (default), 1, 2 or │ │ │ │ + * wwiiddtthh (iinntt) – The device width. │ │ │ │ + * hheeiigghhtt (iinntt) – The device height. │ │ │ │ + * rroottaattee (iinntt) – An integer value of 0 (default), 1, 2 or │ │ │ │ 3 only, where 0 is no rotation, 1 is rotate 90° │ │ │ │ clockwise, 2 is 180° rotation and 3 represents 270° │ │ │ │ rotation. │ │ │ │ - * mmooddee (_ss_tt_rr) – The supported color model, one of "1", │ │ │ │ + * mmooddee (ssttrr) – The supported color model, one of "1", │ │ │ │ "RGB" or "RGBA" only. │ │ │ │ cleanup()_¶ │ │ │ │ Attempt to switch the device off or put into low power mode (this │ │ │ │ helps prolong the life of the device), clear the screen and close │ │ │ │ resources associated with the underlying serial interface. │ │ │ │ If persist is True, the device will not be switched off. │ │ │ │ This is a managed function, which is called when the python │ │ │ │ @@ -798,75 +798,75 @@ │ │ │ │ through as data. │ │ │ │ contrast(lleevveell)_[_s_o_u_r_c_e_]_¶ │ │ │ │ Switches the display contrast to the desired level, in the range 0- │ │ │ │ 255. Note that setting the level to a low (or zero) value will not │ │ │ │ necessarily dim the display to nearly off. In other words, this │ │ │ │ method is NNOOTT suitable for fade-in/out animation. │ │ │ │ Parameters │ │ │ │ - lleevveell (_ii_nn_tt) – Desired contrast level in the range of 0-255. │ │ │ │ + lleevveell (iinntt) – Desired contrast level in the range of 0-255. │ │ │ │ data(ddaattaa)_¶ │ │ │ │ Sends a data byte or sequence of data bytes through to the │ │ │ │ delegated serial interface. │ │ │ │ display(iimmaaggee)_¶ │ │ │ │ Renders a 24-bit RGB image to the Color OLED display. │ │ │ │ Parameters │ │ │ │ - iimmaaggee (_PP_II_LL_.._II_mm_aa_gg_ee_.._II_mm_aa_gg_ee) – The image to render. │ │ │ │ + iimmaaggee (PPIILL..IImmaaggee..IImmaaggee) – The image to render. │ │ │ │ hide()_¶ │ │ │ │ Switches the display mode OFF, putting the device in low-power │ │ │ │ sleep mode. │ │ │ │ init_framebuffer(ffrraammeebbuuffffeerr)_¶ │ │ │ │ preprocess(iimmaaggee)_¶ │ │ │ │ Provides a preprocessing facility (which may be overridden) whereby │ │ │ │ the supplied image is rotated according to the device’s rotate │ │ │ │ capability. If this method is overridden, it is important to call │ │ │ │ the super method. │ │ │ │ Parameters │ │ │ │ - iimmaaggee (_PP_II_LL_.._II_mm_aa_gg_ee_.._II_mm_aa_gg_ee) – An image to pre-process. │ │ │ │ + iimmaaggee (PPIILL..IImmaaggee..IImmaaggee) – An image to pre-process. │ │ │ │ Returns │ │ │ │ A new processed image. │ │ │ │ Return type │ │ │ │ - _P_I_L_._I_m_a_g_e_._I_m_a_g_e │ │ │ │ + PIL.Image.Image │ │ │ │ show()_¶ │ │ │ │ Sets the display mode ON, waking the device out of a prior low- │ │ │ │ power sleep mode. │ │ │ │ ccllaassss luma.oled.device.ssd1362(sseerriiaall__iinntteerrffaaccee==NNoonnee, wwiiddtthh==225566, hheeiigghhtt==6644, │ │ │ │ rroottaattee==00, mmooddee==''RRGGBB'', ffrraammeebbuuffffeerr==NNoonnee, ****kkwwaarrggss)_[_s_o_u_r_c_e_]_¶ │ │ │ │ Bases: greyscale_device │ │ │ │ Serial interface to a 4-bit greyscale SSD1362 OLED display. │ │ │ │ On creation, an initialization sequence is pumped to the display to │ │ │ │ properly configure it. Further control commands can then be called to │ │ │ │ affect the brightness and other settings. │ │ │ │ Parameters │ │ │ │ * sseerriiaall__iinntteerrffaaccee – The serial interface (usually a │ │ │ │ - _l_u_m_a_._c_o_r_e_._i_n_t_e_r_f_a_c_e_._s_e_r_i_a_l_._s_p_i instance) to delegate sending │ │ │ │ + luma.core.interface.serial.spi instance) to delegate sending │ │ │ │ data and commands through. │ │ │ │ - * wwiiddtthh (_ii_nn_tt) – The number of horizontal pixels (optional, │ │ │ │ + * wwiiddtthh (iinntt) – The number of horizontal pixels (optional, │ │ │ │ defaults to 96). │ │ │ │ - * hheeiigghhtt (_ii_nn_tt) – The number of vertical pixels (optional, │ │ │ │ + * hheeiigghhtt (iinntt) – The number of vertical pixels (optional, │ │ │ │ defaults to 64). │ │ │ │ - * rroottaattee (_ii_nn_tt) – An integer value of 0 (default), 1, 2 or 3 │ │ │ │ + * rroottaattee (iinntt) – An integer value of 0 (default), 1, 2 or 3 │ │ │ │ only, where 0 is no rotation, 1 is rotate 90° clockwise, 2 is │ │ │ │ 180° rotation and 3 represents 270° rotation. │ │ │ │ - * mmooddee (_ss_tt_rr) – Supplying “1” or “RGB” effects a different │ │ │ │ + * mmooddee (ssttrr) – Supplying “1” or “RGB” effects a different │ │ │ │ rendering mechanism, either to monochrome or 4-bit greyscale. │ │ │ │ - * ffrraammeebbuuffffeerr (_ss_tt_rr) – Framebuffering strategy, currently │ │ │ │ + * ffrraammeebbuuffffeerr (ssttrr) – Framebuffering strategy, currently │ │ │ │ instances of diff_to_previous or full_frame are only │ │ │ │ supported │ │ │ │ New in version 3.4.0. │ │ │ │ capabilities(wwiiddtthh, hheeiigghhtt, rroottaattee, mmooddee==''11'')_¶ │ │ │ │ Assigns attributes such as width, height, size and bounding_box │ │ │ │ correctly oriented from the supplied parameters. │ │ │ │ Parameters │ │ │ │ - * wwiiddtthh (_ii_nn_tt) – The device width. │ │ │ │ - * hheeiigghhtt (_ii_nn_tt) – The device height. │ │ │ │ - * rroottaattee (_ii_nn_tt) – An integer value of 0 (default), 1, 2 or │ │ │ │ + * wwiiddtthh (iinntt) – The device width. │ │ │ │ + * hheeiigghhtt (iinntt) – The device height. │ │ │ │ + * rroottaattee (iinntt) – An integer value of 0 (default), 1, 2 or │ │ │ │ 3 only, where 0 is no rotation, 1 is rotate 90° │ │ │ │ clockwise, 2 is 180° rotation and 3 represents 270° │ │ │ │ rotation. │ │ │ │ - * mmooddee (_ss_tt_rr) – The supported color model, one of "1", │ │ │ │ + * mmooddee (ssttrr) – The supported color model, one of "1", │ │ │ │ "RGB" or "RGBA" only. │ │ │ │ cleanup()_¶ │ │ │ │ Attempt to switch the device off or put into low power mode (this │ │ │ │ helps prolong the life of the device), clear the screen and close │ │ │ │ resources associated with the underlying serial interface. │ │ │ │ If persist is True, the device will not be switched off. │ │ │ │ This is a managed function, which is called when the python │ │ │ │ @@ -879,40 +879,40 @@ │ │ │ │ serial interface. │ │ │ │ contrast(lleevveell)_¶ │ │ │ │ Switches the display contrast to the desired level, in the range 0- │ │ │ │ 255. Note that setting the level to a low (or zero) value will not │ │ │ │ necessarily dim the display to nearly off. In other words, this │ │ │ │ method is NNOOTT suitable for fade-in/out animation. │ │ │ │ Parameters │ │ │ │ - lleevveell (_ii_nn_tt) – Desired contrast level in the range of 0-255. │ │ │ │ + lleevveell (iinntt) – Desired contrast level in the range of 0-255. │ │ │ │ data(ddaattaa)_¶ │ │ │ │ Sends a data byte or sequence of data bytes through to the │ │ │ │ delegated serial interface. │ │ │ │ display(iimmaaggee)_¶ │ │ │ │ Takes a 1-bit monochrome or 24-bit RGB image and renders it to the │ │ │ │ greyscale OLED display. RGB pixels are converted to 4-bit greyscale │ │ │ │ values using a simplified Luma calculation, based on │ │ │ │ YY?’==00..229999RR?’++00..558877GG?’++00..111144BB?’. │ │ │ │ Parameters │ │ │ │ - iimmaaggee (_PP_II_LL_.._II_mm_aa_gg_ee_.._II_mm_aa_gg_ee) – The image to render. │ │ │ │ + iimmaaggee (PPIILL..IImmaaggee..IImmaaggee) – The image to render. │ │ │ │ hide()_¶ │ │ │ │ Switches the display mode OFF, putting the device in low-power │ │ │ │ sleep mode. │ │ │ │ init_framebuffer(ffrraammeebbuuffffeerr)_¶ │ │ │ │ preprocess(iimmaaggee)_¶ │ │ │ │ Provides a preprocessing facility (which may be overridden) whereby │ │ │ │ the supplied image is rotated according to the device’s rotate │ │ │ │ capability. If this method is overridden, it is important to call │ │ │ │ the super method. │ │ │ │ Parameters │ │ │ │ - iimmaaggee (_PP_II_LL_.._II_mm_aa_gg_ee_.._II_mm_aa_gg_ee) – An image to pre-process. │ │ │ │ + iimmaaggee (PPIILL..IImmaaggee..IImmaaggee) – An image to pre-process. │ │ │ │ Returns │ │ │ │ A new processed image. │ │ │ │ Return type │ │ │ │ - _P_I_L_._I_m_a_g_e_._I_m_a_g_e │ │ │ │ + PIL.Image.Image │ │ │ │ show()_¶ │ │ │ │ Sets the display mode ON, waking the device out of a prior low- │ │ │ │ power sleep mode. │ │ │ │ ccllaassss luma.oled.device.winstar_weh(sseerriiaall__iinntteerrffaaccee==NNoonnee, wwiiddtthh==1166, hheeiigghhtt==22, │ │ │ │ ****kkwwaarrggss)_[_s_o_u_r_c_e_]_¶ │ │ │ │ Bases: _w_s_0_0_1_0 │ │ │ │ Serial interface to a monochrome Winstar WEH OLED display. This is the │ │ │ │ @@ -922,47 +922,47 @@ │ │ │ │ interface uses a variant of the ws0010 controller’s built-in font that is │ │ │ │ designed to match the grid structure of the weh displays (see note │ │ │ │ below). │ │ │ │ Parameters │ │ │ │ * sseerriiaall__iinntteerrffaaccee – The serial interface (usually a │ │ │ │ luma.core.interface.serial.parallel instance) to delegate │ │ │ │ sending data and commands through. │ │ │ │ - * wwiiddtthh (_ii_nn_tt) – The number of characters that can be displayed │ │ │ │ + * wwiiddtthh (iinntt) – The number of characters that can be displayed │ │ │ │ on a single line. Example: the weh001602a has a width of 16 │ │ │ │ characters. │ │ │ │ - * hheeiigghhtt (_ii_nn_tt) – The number of lines the display has. Example: │ │ │ │ + * hheeiigghhtt (iinntt) – The number of lines the display has. Example: │ │ │ │ the weh001602a has a height of 2 lines. │ │ │ │ - * uunnddeeffiinneedd (_ss_tt_rr) – The character to display if the font │ │ │ │ + * uunnddeeffiinneedd (ssttrr) – The character to display if the font │ │ │ │ doesn’t contain the requested character │ │ │ │ - * ffoonntt (_P_I_L_._I_m_a_g_e_F_o_n_t) – Allows you to override the internal │ │ │ │ + * ffoonntt (PIL.ImageFont) – Allows you to override the internal │ │ │ │ font by passing in an alternate │ │ │ │ - * ddeeffaauulltt__ttaabbllee (_ii_nn_tt) – Select one of the ws0010’s four │ │ │ │ + * ddeeffaauulltt__ttaabbllee (iinntt) – Select one of the ws0010’s four │ │ │ │ embedded font tables (see _w_s_0_0_1_0 documentation) │ │ │ │ * eemmbbeeddddeedd__ffoonntt (ssttrr ''55xx88'' oorr ''55xx1100'') – Select the size of the │ │ │ │ embedded font to use. Allowed sizes are 5x8 (default) and │ │ │ │ 5x10 │ │ │ │ - * eexxeecc__ttiimmee (_ff_ll_oo_aa_tt) – Time in seconds to wait for a command to │ │ │ │ + * eexxeecc__ttiimmee (ffllooaatt) – Time in seconds to wait for a command to │ │ │ │ complete. Default is 50 μs (1e-6 * 50) │ │ │ │ - * rroottaattee (_ii_nn_tt) – An integer value of 0 (default), 1, 2 or 3 │ │ │ │ + * rroottaattee (iinntt) – An integer value of 0 (default), 1, 2 or 3 │ │ │ │ only, where 0 is no rotation, 1 is rotate 90° clockwise, 2 is │ │ │ │ 180° rotation and 3 represents 270° rotation. │ │ │ │ - * ffrraammeebbuuffffeerr (_ss_tt_rr) – Framebuffering strategy, currently values │ │ │ │ + * ffrraammeebbuuffffeerr (ssttrr) – Framebuffering strategy, currently values │ │ │ │ of diff_to_previous or full_frame are only supported. │ │ │ │ New in version 3.6.0. │ │ │ │ capabilities(wwiiddtthh, hheeiigghhtt, rroottaattee, mmooddee==''11'')_¶ │ │ │ │ Assigns attributes such as width, height, size and bounding_box │ │ │ │ correctly oriented from the supplied parameters. │ │ │ │ Parameters │ │ │ │ - * wwiiddtthh (_ii_nn_tt) – The device width. │ │ │ │ - * hheeiigghhtt (_ii_nn_tt) – The device height. │ │ │ │ - * rroottaattee (_ii_nn_tt) – An integer value of 0 (default), 1, 2 or │ │ │ │ + * wwiiddtthh (iinntt) – The device width. │ │ │ │ + * hheeiigghhtt (iinntt) – The device height. │ │ │ │ + * rroottaattee (iinntt) – An integer value of 0 (default), 1, 2 or │ │ │ │ 3 only, where 0 is no rotation, 1 is rotate 90° │ │ │ │ clockwise, 2 is 180° rotation and 3 represents 270° │ │ │ │ rotation. │ │ │ │ - * mmooddee (_ss_tt_rr) – The supported color model, one of "1", │ │ │ │ + * mmooddee (ssttrr) – The supported color model, one of "1", │ │ │ │ "RGB" or "RGBA" only. │ │ │ │ cleanup()_¶ │ │ │ │ Attempt to switch the device off or put into low power mode (this │ │ │ │ helps prolong the life of the device), clear the screen and close │ │ │ │ resources associated with the underlying serial interface. │ │ │ │ If persist is True, the device will not be switched off. │ │ │ │ This is a managed function, which is called when the python │ │ │ │ @@ -971,112 +971,112 @@ │ │ │ │ clear()_¶ │ │ │ │ Initializes the device memory with an empty (blank) image. │ │ │ │ command(**ccmmdd, eexxeecc__ttiimmee==NNoonnee, oonnllyy__llooww__bbiittss==FFaallssee)_¶ │ │ │ │ Sends a command or sequence of commands through to the serial │ │ │ │ interface. If operating in four bit mode, expands each command from │ │ │ │ one byte values (8 bits) to two nibble values (4 bits each) │ │ │ │ Parameters │ │ │ │ - * ccmmdd (_ii_nn_tt) – A spread of commands. │ │ │ │ - * eexxeecc__ttiimmee (_ff_ll_oo_aa_tt) – Amount of time to wait for the │ │ │ │ + * ccmmdd (iinntt) – A spread of commands. │ │ │ │ + * eexxeecc__ttiimmee (ffllooaatt) – Amount of time to wait for the │ │ │ │ command to finish execution. If not provided, the │ │ │ │ device default will be used instead │ │ │ │ - * oonnllyy__llooww__bbiittss (_bb_oo_oo_ll) – If True, only the lowest four │ │ │ │ + * oonnllyy__llooww__bbiittss (bbooooll) – If True, only the lowest four │ │ │ │ bits of the command will be sent. This is necessary on │ │ │ │ some devices during initialization │ │ │ │ contrast(lleevveell)_¶ │ │ │ │ Switches the display contrast to the desired level, in the range 0- │ │ │ │ 255. Note that setting the level to a low (or zero) value will not │ │ │ │ necessarily dim the display to nearly off. In other words, this │ │ │ │ method is NNOOTT suitable for fade-in/out animation. │ │ │ │ Parameters │ │ │ │ - lleevveell (_ii_nn_tt) – Desired contrast level in the range of 0-255. │ │ │ │ + lleevveell (iinntt) – Desired contrast level in the range of 0-255. │ │ │ │ data(ddaattaa)_¶ │ │ │ │ Sends a sequence of bytes through to the serial interface. If │ │ │ │ operating in four bit mode, expands each byte from a single value │ │ │ │ (8 bits) to two nibble values (4 bits each) │ │ │ │ Parameters │ │ │ │ - ddaattaa (_ll_ii_ss_tt) – a sequence of bytes to send to the display │ │ │ │ + ddaattaa (lliisstt) – a sequence of bytes to send to the display │ │ │ │ display(iimmaaggee)_¶ │ │ │ │ - Takes a 1-bit _P_I_L_._I_m_a_g_e and dumps it to the ws0010 OLED display. │ │ │ │ + Takes a 1-bit PIL.Image and dumps it to the ws0010 OLED display. │ │ │ │ get_font(fftt)_¶ │ │ │ │ Load one of the devices embedded fonts by its index value or name │ │ │ │ and return it │ │ │ │ Parameters │ │ │ │ - vvaall (_ii_nn_tt oorr _ss_tt_rr) – The index or the name of the font to │ │ │ │ + vvaall (iinntt oorr ssttrr) – The index or the name of the font to │ │ │ │ return │ │ │ │ hide()_¶ │ │ │ │ Switches the display mode OFF, putting the device in low-power │ │ │ │ sleep mode. │ │ │ │ init_framebuffer(ffrraammeebbuuffffeerr)_¶ │ │ │ │ preprocess(iimmaaggee)_¶ │ │ │ │ Provides a preprocessing facility (which may be overridden) whereby │ │ │ │ the supplied image is rotated according to the device’s rotate │ │ │ │ capability. If this method is overridden, it is important to call │ │ │ │ the super method. │ │ │ │ Parameters │ │ │ │ - iimmaaggee (_PP_II_LL_.._II_mm_aa_gg_ee_.._II_mm_aa_gg_ee) – An image to pre-process. │ │ │ │ + iimmaaggee (PPIILL..IImmaaggee..IImmaaggee) – An image to pre-process. │ │ │ │ Returns │ │ │ │ A new processed image. │ │ │ │ Return type │ │ │ │ - _P_I_L_._I_m_a_g_e_._I_m_a_g_e │ │ │ │ + PIL.Image.Image │ │ │ │ show()_¶ │ │ │ │ Sets the display mode ON, waking the device out of a prior low- │ │ │ │ power sleep mode. │ │ │ │ pprrooppeerrttyy text_¶ │ │ │ │ Returns the current state of the text buffer. This may not reflect │ │ │ │ accurately what is displayed on the device if the font does not │ │ │ │ have a symbol for a requested text value. │ │ │ │ ccllaassss luma.oled.device.ws0010(sseerriiaall__iinntteerrffaaccee==NNoonnee, wwiiddtthh==110000, hheeiigghhtt==1166, │ │ │ │ uunnddeeffiinneedd==''__'', ffoonntt==NNoonnee, sseelleecctteedd__ffoonntt==00, eexxeecc__ttiimmee==44..99999999999999999999999999999966ee--0055, │ │ │ │ rroottaattee==00, ffrraammeebbuuffffeerr==NNoonnee, ccoonnsstt==<>, ****kkwwaarrggss) │ │ │ │ _[_s_o_u_r_c_e_]_¶ │ │ │ │ - Bases: _p_a_r_a_l_l_e_l___d_e_v_i_c_e, _c_h_a_r_a_c_t_e_r, __framebuffer_mixin │ │ │ │ + Bases: parallel_device, character, __framebuffer_mixin │ │ │ │ Serial interface to a monochrome Winstar WS0010 OLED display. This │ │ │ │ interface will work with most ws0010 powered devices including the │ │ │ │ weg010016. │ │ │ │ Parameters │ │ │ │ * sseerriiaall__iinntteerrffaaccee – The serial interface (usually a │ │ │ │ luma.core.interface.serial.parallel instance) to delegate │ │ │ │ sending data and commands through. │ │ │ │ - * wwiiddtthh (_ii_nn_tt) – The number of pixels laid out horizontally. │ │ │ │ - * hheeiigghhtt (_ii_nn_tt) – The number of pixels laid out vertically. │ │ │ │ - * uunnddeeffiinneedd (_ss_tt_rr) – The character to display if the font │ │ │ │ + * wwiiddtthh (iinntt) – The number of pixels laid out horizontally. │ │ │ │ + * hheeiigghhtt (iinntt) – The number of pixels laid out vertically. │ │ │ │ + * uunnddeeffiinneedd (ssttrr) – The character to display if the font │ │ │ │ doesn’t contain the requested character │ │ │ │ - * ffoonntt (_P_I_L_._I_m_a_g_e_F_o_n_t) – Allows you to override the internal │ │ │ │ + * ffoonntt (PIL.ImageFont) – Allows you to override the internal │ │ │ │ font by passing in an alternate │ │ │ │ - * sseelleecctteedd__ffoonntt (_ii_nn_tt oorr _ss_tt_rr) – Select one of the ws0010’s │ │ │ │ + * sseelleecctteedd__ffoonntt (iinntt oorr ssttrr) – Select one of the ws0010’s │ │ │ │ embedded font tables (see note). Can be selected by number or │ │ │ │ name. Default is ‘FT00’ (English Japanese). │ │ │ │ - * eexxeecc__ttiimmee (_ff_ll_oo_aa_tt) – Time in seconds to wait for a command to │ │ │ │ + * eexxeecc__ttiimmee (ffllooaatt) – Time in seconds to wait for a command to │ │ │ │ complete. Default is 50 μs (1e-6 * 50) which is enough for │ │ │ │ all ws0010 commands. │ │ │ │ - * rroottaattee (_ii_nn_tt) – An integer value of 0 (default), 1, 2 or 3 │ │ │ │ + * rroottaattee (iinntt) – An integer value of 0 (default), 1, 2 or 3 │ │ │ │ only, where 0 is no rotation, 1 is rotate 90° clockwise, 2 is │ │ │ │ 180° rotation and 3 represents 270° rotation. │ │ │ │ - * ffrraammeebbuuffffeerr (_ss_tt_rr) – Framebuffering strategy, currently values │ │ │ │ + * ffrraammeebbuuffffeerr (ssttrr) – Framebuffering strategy, currently values │ │ │ │ of diff_to_previous or full_frame are only supported. │ │ │ │ To place text on the display, simply assign the text to the ‘text’ │ │ │ │ instance variable: │ │ │ │ p = parallel(RS=7, E=8, PINS=[25,24,23,18]) │ │ │ │ my_display = ws0010(p, selected_font='FT01') │ │ │ │ my_display.text = 'WS0010 Display\nFont FT01 5x8' │ │ │ │ For more details on how to use the ‘text’ interface see │ │ │ │ - _l_u_m_a_._c_o_r_e_._v_i_r_t_u_a_l_._c_h_a_r_a_c_t_e_r │ │ │ │ + luma.core.virtual.character │ │ │ │ New in version 3.6.0. │ │ │ │ capabilities(wwiiddtthh, hheeiigghhtt, rroottaattee, mmooddee==''11'')_¶ │ │ │ │ Assigns attributes such as width, height, size and bounding_box │ │ │ │ correctly oriented from the supplied parameters. │ │ │ │ Parameters │ │ │ │ - * wwiiddtthh (_ii_nn_tt) – The device width. │ │ │ │ - * hheeiigghhtt (_ii_nn_tt) – The device height. │ │ │ │ - * rroottaattee (_ii_nn_tt) – An integer value of 0 (default), 1, 2 or │ │ │ │ + * wwiiddtthh (iinntt) – The device width. │ │ │ │ + * hheeiigghhtt (iinntt) – The device height. │ │ │ │ + * rroottaattee (iinntt) – An integer value of 0 (default), 1, 2 or │ │ │ │ 3 only, where 0 is no rotation, 1 is rotate 90° │ │ │ │ clockwise, 2 is 180° rotation and 3 represents 270° │ │ │ │ rotation. │ │ │ │ - * mmooddee (_ss_tt_rr) – The supported color model, one of "1", │ │ │ │ + * mmooddee (ssttrr) – The supported color model, one of "1", │ │ │ │ "RGB" or "RGBA" only. │ │ │ │ cleanup()_¶ │ │ │ │ Attempt to switch the device off or put into low power mode (this │ │ │ │ helps prolong the life of the device), clear the screen and close │ │ │ │ resources associated with the underlying serial interface. │ │ │ │ If persist is True, the device will not be switched off. │ │ │ │ This is a managed function, which is called when the python │ │ │ │ @@ -1085,57 +1085,57 @@ │ │ │ │ clear()_¶ │ │ │ │ Initializes the device memory with an empty (blank) image. │ │ │ │ command(**ccmmdd, eexxeecc__ttiimmee==NNoonnee, oonnllyy__llooww__bbiittss==FFaallssee)_¶ │ │ │ │ Sends a command or sequence of commands through to the serial │ │ │ │ interface. If operating in four bit mode, expands each command from │ │ │ │ one byte values (8 bits) to two nibble values (4 bits each) │ │ │ │ Parameters │ │ │ │ - * ccmmdd (_ii_nn_tt) – A spread of commands. │ │ │ │ - * eexxeecc__ttiimmee (_ff_ll_oo_aa_tt) – Amount of time to wait for the │ │ │ │ + * ccmmdd (iinntt) – A spread of commands. │ │ │ │ + * eexxeecc__ttiimmee (ffllooaatt) – Amount of time to wait for the │ │ │ │ command to finish execution. If not provided, the │ │ │ │ device default will be used instead │ │ │ │ - * oonnllyy__llooww__bbiittss (_bb_oo_oo_ll) – If True, only the lowest four │ │ │ │ + * oonnllyy__llooww__bbiittss (bbooooll) – If True, only the lowest four │ │ │ │ bits of the command will be sent. This is necessary on │ │ │ │ some devices during initialization │ │ │ │ contrast(lleevveell)_¶ │ │ │ │ Switches the display contrast to the desired level, in the range 0- │ │ │ │ 255. Note that setting the level to a low (or zero) value will not │ │ │ │ necessarily dim the display to nearly off. In other words, this │ │ │ │ method is NNOOTT suitable for fade-in/out animation. │ │ │ │ Parameters │ │ │ │ - lleevveell (_ii_nn_tt) – Desired contrast level in the range of 0-255. │ │ │ │ + lleevveell (iinntt) – Desired contrast level in the range of 0-255. │ │ │ │ data(ddaattaa)_¶ │ │ │ │ Sends a sequence of bytes through to the serial interface. If │ │ │ │ operating in four bit mode, expands each byte from a single value │ │ │ │ (8 bits) to two nibble values (4 bits each) │ │ │ │ Parameters │ │ │ │ - ddaattaa (_ll_ii_ss_tt) – a sequence of bytes to send to the display │ │ │ │ + ddaattaa (lliisstt) – a sequence of bytes to send to the display │ │ │ │ display(iimmaaggee)_[_s_o_u_r_c_e_]_¶ │ │ │ │ - Takes a 1-bit _P_I_L_._I_m_a_g_e and dumps it to the ws0010 OLED display. │ │ │ │ + Takes a 1-bit PIL.Image and dumps it to the ws0010 OLED display. │ │ │ │ get_font(fftt)_[_s_o_u_r_c_e_]_¶ │ │ │ │ Load one of the devices embedded fonts by its index value or name │ │ │ │ and return it │ │ │ │ Parameters │ │ │ │ - vvaall (_ii_nn_tt oorr _ss_tt_rr) – The index or the name of the font to │ │ │ │ + vvaall (iinntt oorr ssttrr) – The index or the name of the font to │ │ │ │ return │ │ │ │ hide()_¶ │ │ │ │ Switches the display mode OFF, putting the device in low-power │ │ │ │ sleep mode. │ │ │ │ init_framebuffer(ffrraammeebbuuffffeerr)_¶ │ │ │ │ preprocess(iimmaaggee)_¶ │ │ │ │ Provides a preprocessing facility (which may be overridden) whereby │ │ │ │ the supplied image is rotated according to the device’s rotate │ │ │ │ capability. If this method is overridden, it is important to call │ │ │ │ the super method. │ │ │ │ Parameters │ │ │ │ - iimmaaggee (_PP_II_LL_.._II_mm_aa_gg_ee_.._II_mm_aa_gg_ee) – An image to pre-process. │ │ │ │ + iimmaaggee (PPIILL..IImmaaggee..IImmaaggee) – An image to pre-process. │ │ │ │ Returns │ │ │ │ A new processed image. │ │ │ │ Return type │ │ │ │ - _P_I_L_._I_m_a_g_e_._I_m_a_g_e │ │ │ │ + PIL.Image.Image │ │ │ │ show()_¶ │ │ │ │ Sets the display mode ON, waking the device out of a prior low- │ │ │ │ power sleep mode. │ │ │ │ pprrooppeerrttyy text_¶ │ │ │ │ Returns the current state of the text buffer. This may not reflect │ │ │ │ accurately what is displayed on the device if the font does not │ │ │ │ have a symbol for a requested text value. │ │ ├── ./usr/share/doc/luma.oled-doc/html/hardware.html │ │ │ @@ -511,15 +511,15 @@ │ │ │

Note

│ │ │
    │ │ │
  • You have the choice on whether to wire your device with 4 or 8 data-lines. │ │ │ Wiring with 8 provides a faster interface but at the cost of increased wiring │ │ │ complexity. Most implementations use 4 data-lines which provides acceptable │ │ │ performance and is the default setting for the parallel class.

  • │ │ │
  • Reading from the display is not supported by the │ │ │ -luma.core.interface.parallel.bitbang_6800 class so it needs │ │ │ +luma.core.interface.parallel.bitbang_6800 class so it needs │ │ │ to be connected to ground in order to always be set for writes (assuming the │ │ │ device uses logic-low for write).

  • │ │ │
│ │ │ │ │ │
│ │ │

Warning

│ │ │
    │ │ │ ├── html2text {} │ │ │ │ @@ -192,15 +192,15 @@ │ │ │ │ Note │ │ │ │ * You have the choice on whether to wire your device with 4 or 8 data- │ │ │ │ lines. Wiring with 8 provides a faster interface but at the cost of │ │ │ │ increased wiring complexity. Most implementations use 4 data-lines which │ │ │ │ provides acceptable performance and is the default setting for the │ │ │ │ parallel class. │ │ │ │ * Reading from the display is not supported by the │ │ │ │ - _l_u_m_a_._c_o_r_e_._i_n_t_e_r_f_a_c_e_._p_a_r_a_l_l_e_l_._b_i_t_b_a_n_g___6_8_0_0 class so it needs to be │ │ │ │ + luma.core.interface.parallel.bitbang_6800 class so it needs to be │ │ │ │ connected to ground in order to always be set for writes (assuming the │ │ │ │ device uses logic-low for write). │ │ │ │ Warning │ │ │ │ * Be careful with the logic level of the device you are using. Many SBCs │ │ │ │ including the Raspberry Pi uses 3.3V logic. If your device supplies 5V to │ │ │ │ one of the GPIO pins of an SBC that uses 3.3V logic, you may damage your │ │ │ │ SBC. │ │ ├── ./usr/share/doc/luma.oled-doc/html/python-usage.html │ │ │ @@ -76,31 +76,31 @@ │ │ │ cases when drawing text and graphics primitives, the canvas class should be used │ │ │ as follows:

    │ │ │
    with canvas(device) as draw:
    │ │ │      draw.rectangle(device.bounding_box, outline="white", fill="black")
    │ │ │      draw.text((30, 40), "Hello World", fill="white")
    │ │ │  
    │ │ │
    │ │ │ -

    The luma.core.render.canvas class automatically creates an PIL.ImageDraw │ │ │ +

    The luma.core.render.canvas class automatically creates an PIL.ImageDraw │ │ │ object of the correct dimensions and bit depth suitable for the device, so you │ │ │ may then call the usual Pillow methods to draw onto the canvas.

    │ │ │

    As soon as the with scope is ended, the resultant image is automatically │ │ │ -flushed to the device’s display memory and the PIL.ImageDraw object is │ │ │ +flushed to the device’s display memory and the PIL.ImageDraw object is │ │ │ garbage collected.

    │ │ │
    │ │ │

    Note

    │ │ │

    When a program ends, the display is automatically cleared. This means that a │ │ │ fast program that ends quickly may never display a visible image.

    │ │ │
    │ │ │
    │ │ │

    Color Model

    │ │ │ -

    Any of the standard PIL.ImageColor color formats may be used, but since │ │ │ +

    Any of the standard PIL.ImageColor color formats may be used, but since │ │ │ the SSD1306, SH1106 and WS0010 OLEDs are monochrome, only the HTML color names │ │ │ "black" and "white" values should really be used; in fact, by default, │ │ │ -any value other than black is treated as white. The luma.core.render.canvas │ │ │ +any value other than black is treated as white. The luma.core.render.canvas │ │ │ object does have a dither flag which if set to True, will convert color drawings │ │ │ to a dithered monochrome effect (see the 3d_box.py example, below).

    │ │ │
    with canvas(device, dither=True) as draw:
    │ │ │      draw.rectangle((10, 10, 30, 30), outline="white", fill="red")
    │ │ │  
    │ │ │
    │ │ │

    There is no such constraint on the SSD1331 or SSD1351 OLEDs, which features │ │ │ ├── html2text {} │ │ │ │ @@ -31,28 +31,28 @@ │ │ │ │ The device classes all expose a display() method which takes an image with │ │ │ │ attributes consistent with the capabilities of the device. However, for most │ │ │ │ cases when drawing text and graphics primitives, the canvas class should be │ │ │ │ used as follows: │ │ │ │ with canvas(device) as draw: │ │ │ │ draw.rectangle(device.bounding_box, outline="white", fill="black") │ │ │ │ draw.text((30, 40), "Hello World", fill="white") │ │ │ │ -The _l_u_m_a_._c_o_r_e_._r_e_n_d_e_r_._c_a_n_v_a_s class automatically creates an _P_I_L_._I_m_a_g_e_D_r_a_w object │ │ │ │ +The luma.core.render.canvas class automatically creates an PIL.ImageDraw object │ │ │ │ of the correct dimensions and bit depth suitable for the device, so you may │ │ │ │ then call the usual Pillow methods to draw onto the canvas. │ │ │ │ As soon as the with scope is ended, the resultant image is automatically │ │ │ │ -flushed to the device’s display memory and the _P_I_L_._I_m_a_g_e_D_r_a_w object is garbage │ │ │ │ +flushed to the device’s display memory and the PIL.ImageDraw object is garbage │ │ │ │ collected. │ │ │ │ Note │ │ │ │ When a program ends, the display is automatically cleared. This means that a │ │ │ │ fast program that ends quickly may never display a visible image. │ │ │ │ ********** CCoolloorr MMooddeell_?¶ ********** │ │ │ │ -Any of the standard _P_I_L_._I_m_a_g_e_C_o_l_o_r color formats may be used, but since the │ │ │ │ +Any of the standard PIL.ImageColor color formats may be used, but since the │ │ │ │ SSD1306, SH1106 and WS0010 OLEDs are monochrome, only the HTML color names │ │ │ │ "black" and "white" values should really be used; in fact, by default, any │ │ │ │ -value ootthheerr than black is treated as white. The _l_u_m_a_._c_o_r_e_._r_e_n_d_e_r_._c_a_n_v_a_s object │ │ │ │ +value ootthheerr than black is treated as white. The luma.core.render.canvas object │ │ │ │ does have a dither flag which if set to True, will convert color drawings to a │ │ │ │ dithered monochrome effect (see the 33dd__bbooxx..ppyy example, below). │ │ │ │ with canvas(device, dither=True) as draw: │ │ │ │ draw.rectangle((10, 10, 30, 30), outline="white", fill="red") │ │ │ │ There is no such constraint on the SSD1331 or SSD1351 OLEDs, which features 16- │ │ │ │ bit RGB colors: 24-bit RGB images are downsized to 16-bit using a 565 scheme. │ │ │ │ The SSD1322, SSD1325 and SSD1362 OLEDs all support 16 greyscale graduations: