--- /srv/rebuilderd/tmp/rebuilderdyMhX2W/inputs/luma.lcd-doc_2.10.0-1_all.deb +++ /srv/rebuilderd/tmp/rebuilderdyMhX2W/out/luma.lcd-doc_2.10.0-1_all.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2023-01-21 09:29:47.000000 debian-binary │ --rw-r--r-- 0 0 0 2192 2023-01-21 09:29:47.000000 control.tar.xz │ --rw-r--r-- 0 0 0 2815892 2023-01-21 09:29:47.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 2188 2023-01-21 09:29:47.000000 control.tar.xz │ +-rw-r--r-- 0 0 0 2815440 2023-01-21 09:29:47.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./control │ │ │ @@ -1,13 +1,13 @@ │ │ │ Package: luma.lcd-doc │ │ │ Source: luma.lcd │ │ │ Version: 2.10.0-1 │ │ │ Architecture: all │ │ │ Maintainer: Debian Electronics Team │ │ │ -Installed-Size: 3627 │ │ │ +Installed-Size: 3610 │ │ │ Depends: libjs-sphinxdoc (>= 5.2) │ │ │ Section: python │ │ │ Priority: optional │ │ │ Homepage: https://github.com/rm-hull/luma.lcd │ │ │ Description: doc for library interfacing small LCD displays │ │ │ Library provides a Python 3 interface to small LCD displays connected to │ │ │ Raspberry Pi and other Linux-based single-board computers (SBC). │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ ├── data.tar.xz │ ├── data.tar │ │ ├── file list │ │ │ @@ -3,15 +3,15 @@ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2023-01-21 09:29:47.000000 ./usr/share/ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2023-01-21 09:29:47.000000 ./usr/share/doc/ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/ │ │ │ -rw-r--r-- 0 root (0) root (0) 510 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/changelog.Debian.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 1403 2022-10-19 19:36:24.000000 ./usr/share/doc/luma.lcd-doc/changelog.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 1404 2023-01-21 09:28:24.000000 ./usr/share/doc/luma.lcd-doc/copyright │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/ │ │ │ --rw-r--r-- 0 root (0) root (0) 28670 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/HD44780.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 27959 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/HD44780.html │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/_images/ │ │ │ -rw-r--r-- 0 root (0) root (0) 25300 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/_images/RPi_P5_header.png │ │ │ -rw-r--r-- 0 root (0) root (0) 15272 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/_images/clock_anim.gif │ │ │ -rw-r--r-- 0 root (0) root (0) 620651 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/_images/crawl_anim.gif │ │ │ -rw-r--r-- 0 root (0) root (0) 97841 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/_images/hd44780_20x4.jpg │ │ │ -rw-r--r-- 0 root (0) root (0) 88842 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/_images/hd44780_clock.jpg │ │ │ -rw-r--r-- 0 root (0) root (0) 558152 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/_images/hd44780_progress.jpg │ │ │ @@ -43,23 +43,23 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 28 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/_static/default.css │ │ │ -rw-r--r-- 0 root (0) root (0) 421 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/_static/documentation_options.js │ │ │ -rw-r--r-- 0 root (0) root (0) 286 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/_static/file.png │ │ │ -rw-r--r-- 0 root (0) root (0) 299 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/_static/graphviz.css │ │ │ -rw-r--r-- 0 root (0) root (0) 90 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/_static/minus.png │ │ │ -rw-r--r-- 0 root (0) root (0) 90 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/_static/plus.png │ │ │ -rw-r--r-- 0 root (0) root (0) 4846 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/_static/pygments.css │ │ │ --rw-r--r-- 0 root (0) root (0) 162230 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/api-documentation.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 145832 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/api-documentation.html │ │ │ -rw-r--r-- 0 root (0) root (0) 19589 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/genindex.html │ │ │ --rw-r--r-- 0 root (0) root (0) 41147 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/hardware.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 40962 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/hardware.html │ │ │ -rw-r--r-- 0 root (0) root (0) 20141 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/index.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6489 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/install.html │ │ │ -rw-r--r-- 0 root (0) root (0) 10701 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/intro.html │ │ │ -rw-r--r-- 0 root (0) root (0) 2035 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/objects.inv │ │ │ -rw-r--r-- 0 root (0) root (0) 4542 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/py-modindex.html │ │ │ --rw-r--r-- 0 root (0) root (0) 25015 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/python-usage.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 23854 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/python-usage.html │ │ │ -rw-r--r-- 0 root (0) root (0) 7716 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/references.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3898 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/search.html │ │ │ -rw-r--r-- 0 root (0) root (0) 36510 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/searchindex.js │ │ │ -rw-r--r-- 0 root (0) root (0) 8503 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/software.html │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/_static/_sphinx_javascript_frameworks_compat.js -> ../../../../javascript/sphinxdoc/1.0/_sphinx_javascript_frameworks_compat.js │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/_static/doctools.js -> ../../../../javascript/sphinxdoc/1.0/doctools.js │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2023-01-21 09:29:47.000000 ./usr/share/doc/luma.lcd-doc/html/_static/jquery.js -> ../../../../javascript/sphinxdoc/1.0/jquery.js │ │ ├── ./usr/share/doc/luma.lcd-doc/html/HD44780.html │ │ │ @@ -74,15 +74,15 @@ │ │ │

In addition to the built-in characters, HD44780s can have up to eight custom │ │ │ written into their RAM. This feature is used by luma.lcd to provide a limited │ │ │ graphics capability.

│ │ │
│ │ │

Character-mode Usage

│ │ │

When using luma.lcd.device.hd44780 the most common way of controlling │ │ │ the display is to use the text property which operates similarly to the │ │ │ -luma.core.virtual.sevensegment wrapper class. To use it, assign the │ │ │ +luma.core.virtual.sevensegment wrapper class. To use it, assign the │ │ │ text property a string containing the values that you want displayed:

│ │ │
from luma.core.interface.parallel import bitbang_6800
│ │ │  from luma.lcd.device import hd44780
│ │ │  
│ │ │  interface = bitbang_6800(RS=7, E=8, PINS=[25, 24, 23, 27])
│ │ │  device = hd44780(interface, width=16, height=2)
│ │ │  
│ │ │ @@ -162,15 +162,15 @@
│ │ │  
  • The get_font method of the hd44780 class is used to retrieve the internal │ │ │ font used by the device. This enables us to place exact replicas of the │ │ │ characters within the font tables on the canvas. When these characters are │ │ │ displayed, because they are already normal characters, they do not consume any │ │ │ of the customer character RAM. The hd44780 class contains both the A00 and A02 │ │ │ font tables. You should request the table that matches what is installed in │ │ │ your display.

  • │ │ │ -
  • The progress bar is drawn using normal PIL.ImageDraw primitives in this case a │ │ │ +

  • The progress bar is drawn using normal PIL.ImageDraw primitives in this case a │ │ │ couple of calls to the rectangle method and a call to the text method.

  • │ │ │
  • The size of the progress bar was carefully chosen. It is 70 pixels wide by 8 │ │ │ pixels high. This will fill 14 characters worth of space. This is because │ │ │ each cell is 5 pixels wide (70/5=14) and it is 8 pixels high (8/8=1). │ │ │ Normally 14 cells worth of graphical content would be a problem. However, the │ │ │ progress bar only requires four custom characters regardless of what position │ │ │ the progress value is set to. To see why that is you need to look at what each │ │ │ @@ -247,15 +247,15 @@ │ │ │ │ │ │ │ │ │

  • │ │ │
    │ │ │
    │ │ │

    Embedded Font Tables

    │ │ │

    The luma.lcd.device.hd44780 class leverages │ │ │ -luma.core.bitmap_font to include two fonts that replicate the two font │ │ │ +luma.core.bitmap_font to include two fonts that replicate the two font │ │ │ tables that are commonly available for the hd44780 device. These are:

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -290,15 +290,15 @@ │ │ │ │ │ │

    This feature leverages the custom character capability so it has the same 8 │ │ │ character limitation. If you exceed 8 characters within a screen, the undefined │ │ │ character will be used for all additional characters that are not contained │ │ │ within the devices font table.

    │ │ │

    The table for all display characters can be found in the luma.lcd.const.hd44780.FONTDATA │ │ │ attribute.

    │ │ │ -

    See the documentation for luma.core.bitmap_font for more information on │ │ │ +

    See the documentation for luma.core.bitmap_font for more information on │ │ │ how to use the bitmap_font module.

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ ├── html2text {} │ │ │ │ @@ -27,15 +27,15 @@ │ │ │ │ details on which characters are included in each. │ │ │ │ In addition to the built-in characters, HD44780s can have up to eight custom │ │ │ │ written into their RAM. This feature is used by luma.lcd to provide a limited │ │ │ │ graphics capability. │ │ │ │ ******** CChhaarraacctteerr--mmooddee UUssaaggee_?¶ ******** │ │ │ │ When using _l_u_m_a_._l_c_d_._d_e_v_i_c_e_._h_d_4_4_7_8_0 the most common way of controlling the │ │ │ │ display is to use thetextproperty which operates similarly to the │ │ │ │ -_l_u_m_a_._c_o_r_e_._v_i_r_t_u_a_l_._s_e_v_e_n_s_e_g_m_e_n_t wrapper class. To use it, assign thetextproperty │ │ │ │ +luma.core.virtual.sevensegment wrapper class. To use it, assign thetextproperty │ │ │ │ a string containing the values that you want displayed: │ │ │ │ from luma.core.interface.parallel import bitbang_6800 │ │ │ │ from luma.lcd.device import hd44780 │ │ │ │ │ │ │ │ interface = bitbang_6800(RS=7, E=8, PINS=[25, 24, 23, 27]) │ │ │ │ device = hd44780(interface, width=16, height=2) │ │ │ │ │ │ │ │ @@ -109,15 +109,15 @@ │ │ │ │ * The get_font method of the hd44780 class is used to retrieve the internal │ │ │ │ font used by the device. This enables us to place exact replicas of the │ │ │ │ characters within the font tables on the canvas. When these characters │ │ │ │ are displayed, because they are already normal characters, they do not │ │ │ │ consume any of the customer character RAM. The hd44780 class contains │ │ │ │ both the A00 and A02 font tables. You should request the table that │ │ │ │ matches what is installed in your display. │ │ │ │ - * The progress bar is drawn using normal _P_I_L_._I_m_a_g_e_D_r_a_w primitives in this │ │ │ │ + * The progress bar is drawn using normal PIL.ImageDraw primitives in this │ │ │ │ case a couple of calls to the rectangle method and a call to the text │ │ │ │ method. │ │ │ │ * The size of the progress bar was carefully chosen. It is 70 pixels wide │ │ │ │ by 8 pixels high. This will fill 14 characters worth of space. This is │ │ │ │ because each cell is 5 pixels wide (70/5=14) and it is 8 pixels high (8/ │ │ │ │ 8=1). Normally 14 cells worth of graphical content would be a problem. │ │ │ │ However, the progress bar only requires four custom characters regardless │ │ │ │ @@ -149,15 +149,15 @@ │ │ │ │ * Make sure to align the placement of the text to the 5x8 cell │ │ │ │ structure of the display │ │ │ │ Good: │ │ │ │ draw.text( (5,0), 'Good', fill='white' font=device.get_font('A00')) │ │ │ │ Bad: │ │ │ │ draw.text( (6,1), 'Bad', fill='white' font=device.get_font('A00')) │ │ │ │ ******** EEmmbbeeddddeedd FFoonntt TTaabblleess_?¶ ******** │ │ │ │ -The _l_u_m_a_._l_c_d_._d_e_v_i_c_e_._h_d_4_4_7_8_0 class leverages _l_u_m_a_._c_o_r_e_._b_i_t_m_a_p___f_o_n_t to include │ │ │ │ +The _l_u_m_a_._l_c_d_._d_e_v_i_c_e_._h_d_4_4_7_8_0 class leverages luma.core.bitmap_font to include │ │ │ │ two fonts that replicate the two font tables that are commonly available for │ │ │ │ the hd44780 device. These are: │ │ │ │ FFoonntt TTaabbllee FFoonntt NNaammee │ │ │ │ A00 English Japanese │ │ │ │ A02 English European │ │ │ │ You can retrieve either of these fonts using the get_font method: │ │ │ │ fnt = device.get_font('A02') │ │ │ │ @@ -173,15 +173,15 @@ │ │ │ │ device.text = '\u25b6 Play' │ │ │ │ This feature leverages the custom character capability so it has the same 8 │ │ │ │ character limitation. If you exceed 8 characters within a screen, the undefined │ │ │ │ character will be used for all additional characters that are not contained │ │ │ │ within the devices font table. │ │ │ │ The table for all display characters can be found in the │ │ │ │ luma.lcd.const.hd44780.FONTDATA attribute. │ │ │ │ -See the documentation for _l_u_m_a_._c_o_r_e_._b_i_t_m_a_p___f_o_n_t for more information on how to │ │ │ │ +See the documentation for luma.core.bitmap_font for more information on how to │ │ │ │ use the bitmap_font module. │ │ │ │ ******** _TT_aa_bb_ll_ee_ _oo_ff_ _CC_oo_nn_tt_ee_nn_tt_ss ******** │ │ │ │ * _H_D_4_4_7_8_0 │ │ │ │ o _I_n_t_r_o_d_u_c_t_i_o_n │ │ │ │ o _C_a_p_a_b_i_l_i_t_i_e_s │ │ │ │ # _C_h_a_r_a_c_t_e_r_-_m_o_d_e_ _U_s_a_g_e │ │ │ │ # _G_r_a_p_h_i_c_s_-_m_o_d_e_ _U_s_a_g_e │ │ ├── ./usr/share/doc/luma.lcd-doc/html/api-documentation.html │ │ │ @@ -112,57 +112,57 @@ │ │ │ │ │ │
    │ │ │

    luma.lcd.device

    │ │ │

    Collection of serial interfaces to LCD devices.

    │ │ │
    │ │ │
    │ │ │ class luma.lcd.device.hd44780(serial_interface=None, width=16, height=2, undefined='_', selected_font=0, exec_time=1e-06, framebuffer=None, **kwargs)[source]
    │ │ │ -

    Bases: backlit_device, parallel_device, character, __framebuffer_mixin

    │ │ │ +

    Bases: backlit_device, parallel_device, character, __framebuffer_mixin

    │ │ │

    Driver for a HD44780 style LCD display. This class provides a text │ │ │ property which can be used to set and get a text value, which will be │ │ │ rendered to the display’s screen using the display’s built-in font.

    │ │ │
    │ │ │
    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 line.

    • │ │ │ -
    • height (int) – The number of lines the display supports.

    • │ │ │ -
    • undefined (str) – character to use if a requested character is not in the │ │ │ +

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

    • │ │ │ +
    • height (int) – The number of lines the display supports.

    • │ │ │ +
    • undefined (str) – character to use if a requested character is not in the │ │ │ font tables

    • │ │ │ -
    • selected_font (int or str) – the font table appropriate for the model of display │ │ │ +

    • selected_font (int or str) – the font table appropriate for the model of display │ │ │ you are using. The hd44780 normally comes in a version with font A00 │ │ │ (ENGLISH_JAPANESE) or A02 (ENGLISH_EUROPEAN). You can provide either │ │ │ the name (‘A00’ or ‘A02’) or the number (0 for ‘A00’, 1 for ‘A02’) for │ │ │ the font your display contains.

    • │ │ │ -
    • 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 typically is long enough for commands │ │ │ to finish. If your display is not working correctly, you may want to │ │ │ try increasing the exec_time delay.

    • │ │ │ -
    • gpio_LIGHT (int) – The GPIO pin to use for the backlight if it is controlled by │ │ │ +

    • gpio_LIGHT (int) – The GPIO pin to use for the backlight if it is controlled by │ │ │ one of the GPIO pins.

    • │ │ │ -
    • active_low (bool) – Set to true if backlight is active low (default), false │ │ │ +

    • active_low (bool) – Set to true if backlight is active low (default), false │ │ │ otherwise.

    • │ │ │ -
    • pwm_frequency (float) – Use PWM for backlight brightness control with the │ │ │ +

    • pwm_frequency (float) – Use PWM for backlight brightness control with the │ │ │ specified frequency when provided.

    • │ │ │
    • framebuffer (luma.core.framebuffer.framebuffer) – Framebuffering strategy, currently instances 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 = hd44780(p, selected_font='A00')
    │ │ │  my_display.text = 'HD44780 Display\nFont A00 Eng/Jap'
    │ │ │  
    │ │ │
    │ │ │

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

    │ │ │ +luma.core.virtual.character

    │ │ │
    │ │ │
    ..note:

    This driver currently only supports the hd44780 5x8 display mode.

    │ │ │
    │ │ │
    │ │ │
    │ │ │

    New in version 2.5.0.

    │ │ │
    │ │ │ @@ -170,20 +170,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.

    • │ │ │
    │ │ │
    │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ @@ -204,18 +204,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

    • │ │ │
    │ │ │
    │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ @@ -228,42 +228,42 @@ │ │ │
    │ │ │ 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 converts it to text data │ │ │ +

    Takes a 1-bit PIL.Image and converts it to text data │ │ │ by reversing from glyphs from the image back to the correct │ │ │ value from the displays font table.

    │ │ │
    │ │ │
    Parameters
    │ │ │ -

    image (PIL.Image.Image) – the image to place on the display

    │ │ │ +

    image (PIL.Image.Image) – the image to place on the display

    │ │ │
    │ │ │
    │ │ │

    If needed, it will create custom characters if a glyph is not found │ │ │ within the font table.

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

    Return one of the devices built-in fonts as a PIL.ImageFont │ │ │ +

    Return one of the devices built-in fonts as a PIL.ImageFont │ │ │ object

    │ │ │
    │ │ │
    Parameters
    │ │ │ -

    ft (int or str) – name or number of the font to return (0 - A00, 1 - A02)

    │ │ │ +

    ft (int or str) – name or number of the font to return (0 - A00, 1 - A02)

    │ │ │
    │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ hide()
    │ │ │ @@ -280,21 +280,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()
    │ │ │ @@ -321,41 +321,41 @@ │ │ │ configure it. Further control commands can then be called to affect the │ │ │ brightness and other settings.

    │ │ │
    │ │ │
    Parameters
    │ │ │
      │ │ │
    • gpio – The GPIO library to use (usually RPi.GPIO) │ │ │ to delegate sending data and commands through.

    • │ │ │ -
    • width (int) – The number of 7 segment characters laid out horizontally.

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

    • width (int) – The number of 7 segment characters laid out horizontally.

    • │ │ │ +
    • 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.

    • │ │ │ -
    • WR (int) – The write (SPI clock) pin to connect to, default BCM 11.

    • │ │ │ -
    • DAT (int) – The data pin to connect to, default BCM 10.

    • │ │ │ -
    • CS (int) – The chip select pin to connect to, default BCM 8.

    • │ │ │ +
    • WR (int) – The write (SPI clock) pin to connect to, default BCM 11.

    • │ │ │ +
    • DAT (int) – The data pin to connect to, default BCM 10.

    • │ │ │ +
    • CS (int) – The chip select pin to connect to, default BCM 8.

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

    New in version 0.4.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.

    • │ │ │
    │ │ │
    │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ @@ -383,30 +383,30 @@ │ │ │ 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)[source]
    │ │ │

    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 PCD8544 │ │ │ +

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

    │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ hide()
    │ │ │

    Switches the display mode OFF, putting the device in low-power │ │ │ @@ -417,21 +417,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()
    │ │ │ @@ -449,27 +449,27 @@ │ │ │

    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 pixels laid out horizontally.

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

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

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

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

    • │ │ │ +
    • 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 (luma.core.framebuffer.framebuffer) – 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 (int) – Vertical offset (in pixels) of screen to device memory │ │ │ +

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

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

    New in version 2.2.0.

    │ │ │
    │ │ │ @@ -477,20 +477,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.

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

    NOT SUPPORTED

    │ │ │
    │ │ │
    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)
    │ │ │ @@ -536,15 +536,15 @@ │ │ │
    │ │ │ display(image)[source]
    │ │ │

    Renders a 24-bit RGB image to the ILI9341 LCD display. The 8-bit RGB │ │ │ values are passed directly to the devices internal storage, but only │ │ │ the 6 most-significant bits are used by the display.

    │ │ │
    │ │ │
    Parameters
    │ │ │ -

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

    │ │ │ +

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

    │ │ │
    │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ hide()
    │ │ │ @@ -561,21 +561,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()
    │ │ │ @@ -597,27 +597,27 @@ │ │ │ 3.5-inch IPS LCD(B) – used a portrait orientation. Images were │ │ │ rendered correctly only when specifying that height was 480 pixels │ │ │ and the width was 320.

    │ │ │
    │ │ │
    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 pixels laid out horizontally.

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

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

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

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

    • │ │ │ +
    • 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 (luma.core.framebuffer.framebuffer) – 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 (int) – Vertical offset (in pixels) of screen to device memory │ │ │ +

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

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

    New in version 2.8.0.

    │ │ │
    │ │ │ @@ -625,20 +625,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.

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

    NOT SUPPORTED

    │ │ │
    │ │ │
    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)
    │ │ │ @@ -684,15 +684,15 @@ │ │ │
    │ │ │ display(image)[source]
    │ │ │

    Renders a 24-bit RGB image to the ILI9486 LCD display. The 8-bit RGB │ │ │ values are passed directly to the devices internal storage, but only │ │ │ the 6 most-significant bits are used by the display.

    │ │ │
    │ │ │
    Parameters
    │ │ │ -

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

    │ │ │ +

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

    │ │ │
    │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ hide()
    │ │ │ @@ -709,21 +709,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()
    │ │ │ @@ -741,36 +741,36 @@ │ │ │

    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.

    • │ │ │ -
    • 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.

    • │ │ │
    │ │ │
    │ │ │
    │ │ │
    │ │ │
    │ │ │ 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.

    • │ │ │
    │ │ │
    │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ @@ -805,15 +805,15 @@ │ │ │

    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 PCD8544 │ │ │ +

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

    │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ hide()
    │ │ │

    Switches the display mode OFF, putting the device in low-power │ │ │ @@ -824,21 +824,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()
    │ │ │ @@ -856,17 +856,17 @@ │ │ │

    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.

    • │ │ │ -
    • 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.

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

    New in version 1.1.0.

    │ │ │ @@ -875,20 +875,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.

    • │ │ │
    │ │ │
    │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ @@ -923,15 +923,15 @@ │ │ │

    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 ST7567 │ │ │ +

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

    │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ hide()
    │ │ │

    Switches the display mode OFF, putting the device in low-power │ │ │ @@ -942,21 +942,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()
    │ │ │ @@ -974,28 +974,28 @@ │ │ │

    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 pixels laid out horizontally.

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

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

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

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

    • │ │ │ +
    • 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 (luma.core.framebuffer.framebuffer) – 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).

    • │ │ │ -
    • inverse (bool) – Set to True if device pixels are inversed.

    • │ │ │ -
    • 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).

    • │ │ │ +
    • inverse (bool) – Set to True if device pixels are inversed.

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

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

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

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

    New in version 0.3.0.

    │ │ │
    │ │ │ @@ -1003,20 +1003,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.

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

    NOT SUPPORTED

    │ │ │
    │ │ │
    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)
    │ │ │ @@ -1062,15 +1062,15 @@ │ │ │
    │ │ │ display(image)[source]
    │ │ │

    Renders a 24-bit RGB image to the ST7735 LCD display. The 8-bit RGB │ │ │ values are passed directly to the devices internal storage, but only │ │ │ the 6 most-significant bits are used by the display.

    │ │ │
    │ │ │
    Parameters
    │ │ │ -

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

    │ │ │ +

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

    │ │ │
    │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ hide()
    │ │ │ @@ -1087,21 +1087,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()
    │ │ │ @@ -1123,20 +1123,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.

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

    NOT SUPPORTED

    │ │ │
    │ │ │
    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)
    │ │ │ @@ -1179,18 +1179,18 @@ │ │ │ │ │ │
    │ │ │
    │ │ │ display(image)[source]
    │ │ │

    Should be overridden in sub-classed implementations.

    │ │ │
    │ │ │
    Parameters
    │ │ │ -

    image (PIL.Image.Image) – An image to display.

    │ │ │ +

    image (PIL.Image.Image) – An image to display.

    │ │ │
    │ │ │
    Raises
    │ │ │ -

    NotImplementedError

    │ │ │ +

    NotImplementedError

    │ │ │
    │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ hide()
    │ │ │ @@ -1202,21 +1202,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

    │ │ │
    │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ set_window(x1, y1, x2, y2)[source]
    │ │ │ @@ -1239,17 +1239,17 @@ │ │ │

    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.

    • │ │ │ -
    • 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.

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

    New in version 0.5.0.

    │ │ │ @@ -1258,20 +1258,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.

    • │ │ │
    │ │ │
    │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │ @@ -1306,15 +1306,15 @@ │ │ │

    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 UC1701X │ │ │ +

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

    │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ hide()
    │ │ │

    Switches the display mode OFF, putting the device in low-power │ │ │ @@ -1325,21 +1325,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 {} │ │ │ │ @@ -158,122 +158,122 @@ │ │ │ │ luma.lcd.aux.backlight class. The equivalent functionality has now been │ │ │ │ subsumed into the device classes that have a backlight capability. │ │ │ │ ********** _ll_uu_mm_aa_.._ll_cc_dd_.._dd_ee_vv_ii_cc_ee_?¶ ********** │ │ │ │ Collection of serial interfaces to LCD devices. │ │ │ │ ccllaassss luma.lcd.device.hd44780(sseerriiaall__iinntteerrffaaccee==NNoonnee, wwiiddtthh==1166, hheeiigghhtt==22, │ │ │ │ uunnddeeffiinneedd==''__'', sseelleecctteedd__ffoonntt==00, eexxeecc__ttiimmee==11ee--0066, ffrraammeebbuuffffeerr==NNoonnee, ****kkwwaarrggss) │ │ │ │ _[_s_o_u_r_c_e_]_¶ │ │ │ │ - Bases: backlit_device, _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: backlit_device, parallel_device, character, __framebuffer_mixin │ │ │ │ Driver for a HD44780 style LCD display. This class provides a text │ │ │ │ property which can be used to set and get a text value, which will be │ │ │ │ rendered to the display’s screen using the display’s built-in font. │ │ │ │ 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 line. │ │ │ │ - * hheeiigghhtt (_ii_nn_tt) – The number of lines the display supports. │ │ │ │ - * uunnddeeffiinneedd (_ss_tt_rr) – character to use if a requested character │ │ │ │ + * hheeiigghhtt (iinntt) – The number of lines the display supports. │ │ │ │ + * uunnddeeffiinneedd (ssttrr) – character to use if a requested character │ │ │ │ is not in the font tables │ │ │ │ - * sseelleecctteedd__ffoonntt (_ii_nn_tt oorr _ss_tt_rr) – the font table appropriate for │ │ │ │ + * sseelleecctteedd__ffoonntt (iinntt oorr ssttrr) – the font table appropriate for │ │ │ │ the model of display you are using. The hd44780 normally │ │ │ │ comes in a version with font A00 (ENGLISH_JAPANESE) or A02 │ │ │ │ (ENGLISH_EUROPEAN). You can provide either the name (‘A00’ or │ │ │ │ ‘A02’) or the number (0 for ‘A00’, 1 for ‘A02’) for the font │ │ │ │ your display contains. │ │ │ │ - * 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 typically is │ │ │ │ long enough for commands to finish. If your display is not │ │ │ │ working correctly, you may want to try increasing the │ │ │ │ exec_time delay. │ │ │ │ - * ggppiioo__LLIIGGHHTT (_ii_nn_tt) – The GPIO pin to use for the backlight if │ │ │ │ + * ggppiioo__LLIIGGHHTT (iinntt) – The GPIO pin to use for the backlight if │ │ │ │ it is controlled by one of the GPIO pins. │ │ │ │ - * aaccttiivvee__llooww (_bb_oo_oo_ll) – Set to true if backlight is active low │ │ │ │ + * aaccttiivvee__llooww (bbooooll) – Set to true if backlight is active low │ │ │ │ (default), false otherwise. │ │ │ │ - * ppwwmm__ffrreeqquueennccyy (_ff_ll_oo_aa_tt) – Use PWM for backlight brightness │ │ │ │ + * ppwwmm__ffrreeqquueennccyy (ffllooaatt) – Use PWM for backlight brightness │ │ │ │ control with the specified frequency when provided. │ │ │ │ * ffrraammeebbuuffffeerr (lluummaa..ccoorree..ffrraammeebbuuffffeerr..ffrraammeebbuuffffeerr) – │ │ │ │ Framebuffering strategy, currently instances 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 = hd44780(p, selected_font='A00') │ │ │ │ my_display.text = 'HD44780 Display\nFont A00 Eng/Jap' │ │ │ │ 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 │ │ │ │ ..note: │ │ │ │ This driver currently only supports the hd44780 5x8 display mode. │ │ │ │ New in version 2.5.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 reset the device & switching it off prior to exiting the │ │ │ │ python process. │ │ │ │ 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(**aarrggss)_[_s_o_u_r_c_e_]_¶ │ │ │ │ Not support on this device. Ignore. │ │ │ │ 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 converts it to text data by reversing │ │ │ │ + Takes a 1-bit PIL.Image and converts it to text data by reversing │ │ │ │ from glyphs from the image back to the correct value from the │ │ │ │ displays font table. │ │ │ │ Parameters │ │ │ │ - iimmaaggee (_P_I_L_._I_m_a_g_e_._I_m_a_g_e) – the image to place on the display │ │ │ │ + iimmaaggee (PIL.Image.Image) – the image to place on the display │ │ │ │ If needed, it will create custom characters if a glyph is not found │ │ │ │ within the font table. │ │ │ │ get_font(fftt)_[_s_o_u_r_c_e_]_¶ │ │ │ │ - Return one of the devices built-in fonts as a _P_I_L_._I_m_a_g_e_F_o_n_t object │ │ │ │ + Return one of the devices built-in fonts as a PIL.ImageFont object │ │ │ │ Parameters │ │ │ │ - fftt (_ii_nn_tt oorr _ss_tt_rr) – name or number of the font to return (0 - │ │ │ │ + fftt (iinntt oorr ssttrr) – name or number of the font to return (0 - │ │ │ │ A00, 1 - A02) │ │ │ │ hide()_¶ │ │ │ │ Switches the display mode OFF, putting the device in low-power │ │ │ │ sleep mode. │ │ │ │ init_framebuffer(ffrraammeebbuuffffeerr, ddeeffaauulltt__nnuumm__sseeggmmeennttss)_¶ │ │ │ │ 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. │ │ │ │ @@ -283,35 +283,35 @@ │ │ │ │ Serial interface to a seven segment HT1621 monochrome LCD 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 │ │ │ │ * ggppiioo – The GPIO library to use (usually RPi.GPIO) to delegate │ │ │ │ sending data and commands through. │ │ │ │ - * wwiiddtthh (_ii_nn_tt) – The number of 7 segment characters laid out │ │ │ │ + * wwiiddtthh (iinntt) – The number of 7 segment characters laid out │ │ │ │ horizontally. │ │ │ │ - * 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. │ │ │ │ - * WWRR (_ii_nn_tt) – The write (SPI clock) pin to connect to, default │ │ │ │ + * WWRR (iinntt) – The write (SPI clock) pin to connect to, default │ │ │ │ BCM 11. │ │ │ │ - * DDAATT (_ii_nn_tt) – The data pin to connect to, default BCM 10. │ │ │ │ - * CCSS (_ii_nn_tt) – The chip select pin to connect to, default BCM 8. │ │ │ │ + * DDAATT (iinntt) – The data pin to connect to, default BCM 10. │ │ │ │ + * CCSS (iinntt) – The chip select pin to connect to, default BCM 8. │ │ │ │ New in version 0.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()_[_s_o_u_r_c_e_]_¶ │ │ │ │ Attempt to reset the device & switching it off prior to exiting the │ │ │ │ python process. │ │ │ │ clear()_¶ │ │ │ │ Initializes the device memory with an empty (blank) image. │ │ │ │ command(ccmmdd)_[_s_o_u_r_c_e_]_¶ │ │ │ │ @@ -319,113 +319,113 @@ │ │ │ │ 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)_[_s_o_u_r_c_e_]_¶ │ │ │ │ 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 PCD8544 LCD display. │ │ │ │ + Takes a 1-bit PIL.Image and dumps it to the PCD8544 LCD 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.lcd.device.ili9341(sseerriiaall__iinntteerrffaaccee==NNoonnee, wwiiddtthh==332200, hheeiigghhtt==224400, │ │ │ │ rroottaattee==00, ffrraammeebbuuffffeerr==NNoonnee, hh__ooffffsseett==00, vv__ooffffsseett==00, bbggrr==FFaallssee, ****kkwwaarrggss) │ │ │ │ _[_s_o_u_r_c_e_]_¶ │ │ │ │ Bases: backlit_device, __framebuffer_mixin │ │ │ │ Serial interface to a 262k color (6-6-6 RGB) ILI9341 LCD 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 pixels laid out horizontally. │ │ │ │ - * hheeiigghhtt (_ii_nn_tt) – The number of pixels laid out vertically. │ │ │ │ - * rroottaattee (_ii_nn_tt) – An integer value of 0 (default), 1, 2 or 3 │ │ │ │ + * wwiiddtthh (iinntt) – The number of pixels laid out horizontally. │ │ │ │ + * hheeiigghhtt (iinntt) – The number of pixels laid out vertically. │ │ │ │ + * 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 (lluummaa..ccoorree..ffrraammeebbuuffffeerr..ffrraammeebbuuffffeerr) – │ │ │ │ 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 (_ii_nn_tt) – Vertical offset (in pixels) of screen to │ │ │ │ + * vv__ooffffsseett (iinntt) – Vertical offset (in pixels) of screen to │ │ │ │ device memory (default: 0). │ │ │ │ New in version 2.2.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 reset the device & switching it off prior to exiting the │ │ │ │ python process. │ │ │ │ clear()_¶ │ │ │ │ Initializes the device memory with an empty (blank) image. │ │ │ │ command(ccmmdd, **aarrggss)_[_s_o_u_r_c_e_]_¶ │ │ │ │ Sends a command and an (optional) sequence of arguments through to │ │ │ │ the delegated serial interface. Note that the arguments are passed │ │ │ │ through as data. │ │ │ │ contrast(lleevveell)_[_s_o_u_r_c_e_]_¶ │ │ │ │ NOT SUPPORTED │ │ │ │ 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_]_¶ │ │ │ │ Renders a 24-bit RGB image to the ILI9341 LCD display. The 8-bit │ │ │ │ RGB values are passed directly to the devices internal storage, but │ │ │ │ only the 6 most-significant bits are used by the 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, ddeeffaauulltt__nnuumm__sseeggmmeennttss)_¶ │ │ │ │ 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.lcd.device.ili9486(sseerriiaall__iinntteerrffaaccee==NNoonnee, wwiiddtthh==332200, hheeiigghhtt==448800, │ │ │ │ rroottaattee==00, ffrraammeebbuuffffeerr==NNoonnee, hh__ooffffsseett==00, vv__ooffffsseett==00, bbggrr==FFaallssee, ****kkwwaarrggss) │ │ │ │ _[_s_o_u_r_c_e_]_¶ │ │ │ │ Bases: backlit_device, __framebuffer_mixin │ │ │ │ @@ -434,108 +434,108 @@ │ │ │ │ properly configure it. Further control commands can then be called to │ │ │ │ affect the brightness (if implemented) and other settings. │ │ │ │ Note that the ILI9486 display used for development – a Waveshare 3.5-inch │ │ │ │ IPS LCD(B) – used a portrait orientation. Images were rendered correctly │ │ │ │ only when specifying that height was 480 pixels and the width was 320. │ │ │ │ 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 pixels laid out horizontally. │ │ │ │ - * hheeiigghhtt (_ii_nn_tt) – The number of pixels laid out vertically. │ │ │ │ - * rroottaattee (_ii_nn_tt) – An integer value of 0 (default), 1, 2 or 3 │ │ │ │ + * wwiiddtthh (iinntt) – The number of pixels laid out horizontally. │ │ │ │ + * hheeiigghhtt (iinntt) – The number of pixels laid out vertically. │ │ │ │ + * 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 (lluummaa..ccoorree..ffrraammeebbuuffffeerr..ffrraammeebbuuffffeerr) – │ │ │ │ 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 (_ii_nn_tt) – Vertical offset (in pixels) of screen to │ │ │ │ + * vv__ooffffsseett (iinntt) – Vertical offset (in pixels) of screen to │ │ │ │ device memory (default: 0). │ │ │ │ New in version 2.8.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 reset the device & switching it off prior to exiting the │ │ │ │ python process. │ │ │ │ clear()_¶ │ │ │ │ Initializes the device memory with an empty (blank) image. │ │ │ │ command(ccmmdd, **aarrggss)_[_s_o_u_r_c_e_]_¶ │ │ │ │ Sends a command and an (optional) sequence of arguments through to │ │ │ │ the delegated serial interface. Note that the arguments are passed │ │ │ │ through as data. │ │ │ │ contrast(lleevveell)_[_s_o_u_r_c_e_]_¶ │ │ │ │ NOT SUPPORTED │ │ │ │ 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_]_¶ │ │ │ │ Renders a 24-bit RGB image to the ILI9486 LCD display. The 8-bit │ │ │ │ RGB values are passed directly to the devices internal storage, but │ │ │ │ only the 6 most-significant bits are used by the 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, ddeeffaauulltt__nnuumm__sseeggmmeennttss)_¶ │ │ │ │ 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.lcd.device.pcd8544(sseerriiaall__iinntteerrffaaccee==NNoonnee, rroottaattee==00, ****kkwwaarrggss) │ │ │ │ _[_s_o_u_r_c_e_]_¶ │ │ │ │ Bases: backlit_device │ │ │ │ Serial interface to a monochrome PCD8544 LCD 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. │ │ │ │ - * 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 reset the device & switching it off prior to exiting the │ │ │ │ python process. │ │ │ │ clear()_¶ │ │ │ │ Initializes the device memory with an empty (blank) image. │ │ │ │ command(**ccmmdd)_¶ │ │ │ │ @@ -543,58 +543,58 @@ │ │ │ │ serial interface. │ │ │ │ contrast(vvaalluuee)_[_s_o_u_r_c_e_]_¶ │ │ │ │ Sets the LCD contrast │ │ │ │ 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 PCD8544 LCD display. │ │ │ │ + Takes a 1-bit PIL.Image and dumps it to the PCD8544 LCD 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.lcd.device.st7567(sseerriiaall__iinntteerrffaaccee==NNoonnee, rroottaattee==00, ****kkwwaarrggss) │ │ │ │ _[_s_o_u_r_c_e_]_¶ │ │ │ │ Bases: backlit_device │ │ │ │ Serial interface to a monochrome ST7567 128x64 pixel LCD 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. │ │ │ │ - * 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 1.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 reset the device & switching it off prior to exiting the │ │ │ │ python process. │ │ │ │ clear()_¶ │ │ │ │ Initializes the device memory with an empty (blank) image. │ │ │ │ command(**ccmmdd)_¶ │ │ │ │ @@ -602,195 +602,195 @@ │ │ │ │ serial interface. │ │ │ │ contrast(vvaalluuee)_[_s_o_u_r_c_e_]_¶ │ │ │ │ Sets the LCD contrast │ │ │ │ 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 ST7567 LCD display │ │ │ │ + Takes a 1-bit PIL.Image and dumps it to the ST7567 LCD 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.lcd.device.st7735(sseerriiaall__iinntteerrffaaccee==NNoonnee, wwiiddtthh==116600, hheeiigghhtt==112288, │ │ │ │ rroottaattee==00, ffrraammeebbuuffffeerr==NNoonnee, hh__ooffffsseett==00, vv__ooffffsseett==00, bbggrr==FFaallssee, iinnvveerrssee==FFaallssee, │ │ │ │ ****kkwwaarrggss)_[_s_o_u_r_c_e_]_¶ │ │ │ │ Bases: backlit_device, __framebuffer_mixin │ │ │ │ Serial interface to a 262K color (6-6-6 RGB) ST7735 LCD 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 pixels laid out horizontally. │ │ │ │ - * hheeiigghhtt (_ii_nn_tt) – The number of pixels laid out vertically. │ │ │ │ - * rroottaattee (_ii_nn_tt) – An integer value of 0 (default), 1, 2 or 3 │ │ │ │ + * wwiiddtthh (iinntt) – The number of pixels laid out horizontally. │ │ │ │ + * hheeiigghhtt (iinntt) – The number of pixels laid out vertically. │ │ │ │ + * 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 (lluummaa..ccoorree..ffrraammeebbuuffffeerr..ffrraammeebbuuffffeerr) – │ │ │ │ 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). │ │ │ │ - * iinnvveerrssee (_bb_oo_oo_ll) – Set to True if device pixels are inversed. │ │ │ │ - * hh__ooffffsseett (_ii_nn_tt) – Horizontal offset (in pixels) of screen to │ │ │ │ + * iinnvveerrssee (bbooooll) – Set to True if device pixels are inversed. │ │ │ │ + * hh__ooffffsseett (iinntt) – Horizontal offset (in pixels) of screen to │ │ │ │ device memory (default: 0). │ │ │ │ - * vv__ooffffsseett (_ii_nn_tt) – Vertical offset (in pixels) of screen to │ │ │ │ + * vv__ooffffsseett (iinntt) – Vertical offset (in pixels) of screen to │ │ │ │ device memory (default: 0). │ │ │ │ New in version 0.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 reset the device & switching it off prior to exiting the │ │ │ │ python process. │ │ │ │ clear()_¶ │ │ │ │ Initializes the device memory with an empty (blank) image. │ │ │ │ command(ccmmdd, **aarrggss)_[_s_o_u_r_c_e_]_¶ │ │ │ │ Sends a command and an (optional) sequence of arguments through to │ │ │ │ the delegated serial interface. Note that the arguments are passed │ │ │ │ through as data. │ │ │ │ contrast(lleevveell)_[_s_o_u_r_c_e_]_¶ │ │ │ │ NOT SUPPORTED │ │ │ │ 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_]_¶ │ │ │ │ Renders a 24-bit RGB image to the ST7735 LCD display. The 8-bit RGB │ │ │ │ values are passed directly to the devices internal storage, but │ │ │ │ only the 6 most-significant bits are used by the 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, ddeeffaauulltt__nnuumm__sseeggmmeennttss)_¶ │ │ │ │ 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.lcd.device.st7789(sseerriiaall__iinntteerrffaaccee==NNoonnee, wwiiddtthh==224400, hheeiigghhtt==224400, │ │ │ │ rroottaattee==00, ****kkwwaarrggss)_[_s_o_u_r_c_e_]_¶ │ │ │ │ Bases: backlit_device │ │ │ │ Serial interface to a colour ST7789 240x240 pixel LCD display. │ │ │ │ New in version 2.9.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 reset the device & switching it off prior to exiting the │ │ │ │ python process. │ │ │ │ clear()_¶ │ │ │ │ Initializes the device memory with an empty (blank) image. │ │ │ │ command(ccmmdd, **aarrggss)_[_s_o_u_r_c_e_]_¶ │ │ │ │ Send a command to the display, with optional arguments. The │ │ │ │ arguments are sent as data bytes, in accordance with the ST7789 │ │ │ │ datasheet. │ │ │ │ contrast(lleevveell)_[_s_o_u_r_c_e_]_¶ │ │ │ │ NOT SUPPORTED │ │ │ │ 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_]_¶ │ │ │ │ Should be overridden in sub-classed implementations. │ │ │ │ Parameters │ │ │ │ - iimmaaggee (_PP_II_LL_.._II_mm_aa_gg_ee_.._II_mm_aa_gg_ee) – An image to display. │ │ │ │ + iimmaaggee (PPIILL..IImmaaggee..IImmaaggee) – An image to display. │ │ │ │ Raises │ │ │ │ - _NN_oo_tt_II_mm_pp_ll_ee_mm_ee_nn_tt_ee_dd_EE_rr_rr_oo_rr – │ │ │ │ + NNoottIImmpplleemmeenntteeddEErrrroorr – │ │ │ │ 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 │ │ │ │ set_window(xx11, yy11, xx22, yy22)_[_s_o_u_r_c_e_]_¶ │ │ │ │ show()_¶ │ │ │ │ Sets the display mode ON, waking the device out of a prior low- │ │ │ │ power sleep mode. │ │ │ │ ccllaassss luma.lcd.device.uc1701x(sseerriiaall__iinntteerrffaaccee==NNoonnee, rroottaattee==00, ****kkwwaarrggss) │ │ │ │ _[_s_o_u_r_c_e_]_¶ │ │ │ │ Bases: backlit_device │ │ │ │ Serial interface to a monochrome UC1701X LCD 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. │ │ │ │ - * 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 0.5.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 reset the device & switching it off prior to exiting the │ │ │ │ python process. │ │ │ │ clear()_¶ │ │ │ │ Initializes the device memory with an empty (blank) image. │ │ │ │ command(**ccmmdd)_¶ │ │ │ │ @@ -798,29 +798,29 @@ │ │ │ │ serial interface. │ │ │ │ contrast(vvaalluuee)_[_s_o_u_r_c_e_]_¶ │ │ │ │ Sets the LCD contrast │ │ │ │ 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 UC1701X LCD display. │ │ │ │ + Takes a 1-bit PIL.Image and dumps it to the UC1701X LCD 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. │ │ │ │ ******** _TT_aa_bb_ll_ee_ _oo_ff_ _CC_oo_nn_tt_ee_nn_tt_ss ******** │ │ │ │ * _A_P_I_ _D_o_c_u_m_e_n_t_a_t_i_o_n │ │ │ │ o _U_p_g_r_a_d_i_n_g │ │ │ │ o _l_u_m_a_._l_c_d_._d_e_v_i_c_e │ │ ├── ./usr/share/doc/luma.lcd-doc/html/hardware.html │ │ │ @@ -1085,15 +1085,15 @@ │ │ │ │ │ │
    │ │ │
    │ │ │

    Note

    │ │ │

    You should verify which pins from the PCF8574 are connected to the pins of the │ │ │ HD44780 display. There is no set standard for this wiring so different │ │ │ vendors will likely have used different approaches. This information will be │ │ │ -needed when initializing luma.core.interface.serial.pcf8574.

    │ │ │ +needed when initializing luma.core.interface.serial.pcf8574.

    │ │ │
    │ │ │
    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    │ │ │ ├── html2text {} │ │ │ │ @@ -310,15 +310,15 @@ │ │ │ │ VDD +5.0V Power * P01-2 5V Power │ │ │ │ SDA Serial Data Line P01-3 GPIO 2 (SDA) │ │ │ │ SCL Serial Clock Line P01-5 GPIO 3 (SCL) │ │ │ │ Note │ │ │ │ You should verify which pins from the PCF8574 are connected to the pins of the │ │ │ │ HD44780 display. There is no set standard for this wiring so different vendors │ │ │ │ will likely have used different approaches. This information will be needed │ │ │ │ -when initializing _l_u_m_a_._c_o_r_e_._i_n_t_e_r_f_a_c_e_._s_e_r_i_a_l_._p_c_f_8_5_7_4. │ │ │ │ +when initializing luma.core.interface.serial.pcf8574. │ │ │ │ ******** _TT_aa_bb_ll_ee_ _oo_ff_ _CC_oo_nn_tt_ee_nn_tt_ss ******** │ │ │ │ * _H_a_r_d_w_a_r_e │ │ │ │ o _I_2_C_ _v_s_._ _S_P_I_ _v_s_ _P_a_r_a_l_l_e_l │ │ │ │ o _I_d_e_n_t_i_f_y_i_n_g_ _y_o_u_r_ _i_n_t_e_r_f_a_c_e │ │ │ │ o _I_2_C │ │ │ │ # _E_n_a_b_l_i_n_g_ _T_h_e_ _I_2_C_ _I_n_t_e_r_f_a_c_e │ │ │ │ # _D_e_t_e_r_m_i_n_i_n_g_ _A_d_d_r_e_s_s │ │ ├── ./usr/share/doc/luma.lcd-doc/html/python-usage.html │ │ │ @@ -74,39 +74,39 @@ │ │ │

    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="red")
    │ │ │  
    │ │ │
    │ │ │ -

    The luma.core.render.canvas class automatically creates an │ │ │ -PIL.ImageDraw object of the correct dimensions and bit depth suitable │ │ │ +

    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.

    │ │ │
    │ │ │
    │ │ │

    Note

    │ │ │

    The use of the display method for the HD44780 is more limited than the other │ │ │ LCDs. The text property is the preferred interface for displaying │ │ │ characters. See HD44780 for more details.

    │ │ │
    │ │ │
    │ │ │

    Color Model

    │ │ │ -

    Any of the standard PIL.ImageColor color formats may be used if your │ │ │ +

    Any of the standard PIL.ImageColor color formats may be used if your │ │ │ device supports them. For monochrome LCDs, 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 object does have a dither flag │ │ │ +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")
    │ │ │  
    │ │ │
    │ │ │

    The ST7735, ST7789 and ILI9341 devices can display 262K colour RGB images. When supplying │ │ │ @@ -140,15 +140,15 @@ │ │ │

    The ILI9486 display defaults to a portrait orientation (320x480), and rotation │ │ │ is required to use the display in landscape mode.

    │ │ │
    │ │ │
    │ │ │

    Seven-Segment Drivers

    │ │ │

    The HT1621 is driven with the luma.lcd.device.ht1621 class, but is │ │ │ not accessed directly: it should be wrapped with the │ │ │ -luma.core.virtual.sevensegment wrapper, as follows:

    │ │ │ +luma.core.virtual.sevensegment wrapper, as follows:

    │ │ │
    from luma.core.virtual import sevensegment
    │ │ │  from luma.lcd.device import ht1621
    │ │ │  
    │ │ │  device = ht1621()
    │ │ │  seg = sevensegment(device)
    │ │ │  
    │ │ │
    │ │ │ @@ -164,15 +164,15 @@ │ │ │ ‘slices’, as per the below example:

    │ │ │
    seg.text[0:5] = "BYE"
    │ │ │  
    │ │ │
    │ │ │

    This replaces HELLO in the previous example, replacing it with BYE. │ │ │ The usual python idioms for slicing (inserting / replacing / deleteing) can be │ │ │ used here, but note if inserted text exceeds the underlying buffer size, a │ │ │ -ValueError is raised.

    │ │ │ +ValueError is raised.

    │ │ │

    Floating point numbers (or text with ‘.’) are handled slightly differently - the │ │ │ decimal-place is fused in place on the character immediately preceding it. This │ │ │ means that it is technically possible to get more characters displayed than the │ │ │ buffer allows, but only because dots are folded into their host character.

    │ │ │
    │ │ │
    │ │ │

    Backlight Control

    │ │ │ ├── html2text {} │ │ │ │ @@ -25,32 +25,32 @@ │ │ │ │ classes all expose a _d_i_s_p_l_a_y_(_) method which takes an image with attributes │ │ │ │ consistent with the capabilities of the device. │ │ │ │ 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="red") │ │ │ │ -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. │ │ │ │ Note │ │ │ │ The use of the display method for the HD44780 is more limited than the other │ │ │ │ LCDs. Thetextproperty is the preferred interface for displaying characters. See │ │ │ │ _H_D_4_4_7_8_0 for more details. │ │ │ │ ********** CCoolloorr MMooddeell_?¶ ********** │ │ │ │ -Any of the standard _P_I_L_._I_m_a_g_e_C_o_l_o_r color formats may be used if your device │ │ │ │ +Any of the standard PIL.ImageColor color formats may be used if your device │ │ │ │ supports them. For monochrome LCDs, 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 does have a │ │ │ │ +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") │ │ │ │ The ST7735, ST7789 and ILI9341 devices can display 262K colour RGB images. When │ │ │ │ supplying 24-bit RGB images, they are automatically downscaled to 18-bit RGB to │ │ │ │ fit these device’s 262K color-space. │ │ │ │ @@ -76,15 +76,15 @@ │ │ │ │ The device.size, device.width and device.height properties reflect the rotated │ │ │ │ dimensions rather than the physical dimensions. │ │ │ │ The HD44780 does not support display rotation. │ │ │ │ The ILI9486 display defaults to a portrait orientation (320x480), and rotation │ │ │ │ is required to use the display in landscape mode. │ │ │ │ ********** SSeevveenn--SSeeggmmeenntt DDrriivveerrss_?¶ ********** │ │ │ │ The HT1621 is driven with the _l_u_m_a_._l_c_d_._d_e_v_i_c_e_._h_t_1_6_2_1 class, but is not accessed │ │ │ │ -directly: it should be wrapped with the _l_u_m_a_._c_o_r_e_._v_i_r_t_u_a_l_._s_e_v_e_n_s_e_g_m_e_n_t wrapper, │ │ │ │ +directly: it should be wrapped with the luma.core.virtual.sevensegment wrapper, │ │ │ │ as follows: │ │ │ │ from luma.core.virtual import sevensegment │ │ │ │ from luma.lcd.device import ht1621 │ │ │ │ │ │ │ │ device = ht1621() │ │ │ │ seg = sevensegment(device) │ │ │ │ The sseegg instance now has a text property which may be assigned, and when it │ │ │ │ @@ -93,15 +93,15 @@ │ │ │ │ 16 character available, and so can write: │ │ │ │ seg.text = "HELLO" │ │ │ │ Rather than updating the whole display buffer, it is possible to update │ │ │ │ ‘slices’, as per the below example: │ │ │ │ seg.text[0:5] = "BYE" │ │ │ │ This replaces HELLO in the previous example, replacing it with BYE. The usual │ │ │ │ python idioms for slicing (inserting / replacing / deleteing) can be used here, │ │ │ │ -but note if inserted text exceeds the underlying buffer size, a _V_a_l_u_e_E_r_r_o_r is │ │ │ │ +but note if inserted text exceeds the underlying buffer size, a ValueError is │ │ │ │ raised. │ │ │ │ Floating point numbers (or text with ‘.’) are handled slightly differently - │ │ │ │ the decimal-place is fused in place on the character immediately preceding it. │ │ │ │ This means that it is technically possible to get more characters displayed │ │ │ │ than the buffer allows, but only because dots are folded into their host │ │ │ │ character. │ │ │ │ ********** BBaacckklliigghhtt CCoonnttrrooll_?¶ **********