Output subsystem

Currently pyLCI uses HD44780-compatible screens as output devices. Minimum screen size is 16x2, 20x4 screens are tested and working. Available output drivers:

Screen object

The o variable you have supplied by main.py load_app() in your applications is a Screen instance. It provides you with a set of functions available to HD44780 displays. Most of drivers just provide low-level functions for HD44780 object, which, in turn, provides Screen object users with high-level functions described below:

class output.drivers.hd44780.HD44780(cols=16, rows=2, do_init=True, debug=False, buffering=True, **kwargs)[source]

An object that provides high-level functions for interaction with display. It contains all the high-level logic and exposes an interface for system and applications to use.

__init__(cols=16, rows=2, do_init=True, debug=False, buffering=True, **kwargs)[source]

Sets variables for high-level functions.


  • rows (default=2): rows of the connected display
  • cols (default=16): columns of the connected display
  • debug (default=False): debug mode which prints out the commands sent to display
  • **kwargs: all the other arguments, get passed further to HD44780.init_display() function

This will ‘right justify’ text from the cursor

Turn the blinking cursor on


Clears the display.

createChar(char_num, char_contents)[source]

Stores a character in the LCD memory so that it can be used later. char_num has to be between 0 and 7 (including) char_contents is a list of 8 bytes (only 5 LSBs are used)


Turns the underline cursor on


Turn the display on (quickly)


Displays data on display. This function checks if the display contents can be redrawn faster by buffering them and checking the output, then either changes characters one-by-one or redraws the screen completely.

*args is a list of strings, where each string corresponds to a row of the display, starting with 0.


Returns cursor to home position. If the display is being scrolled, reverts scrolled data to initial position..

init_display(autoscroll=False, **kwargs)[source]

Initializes HD44780 controller.


  • autoscroll: Controls whether autoscroll-on-char-print is enabled upon initialization.

This is for text that flows Left to Right


This will ‘left justify’ text from the cursor

Turn the blinking cursor off


Turns the underline cursor off


Turn the display off (quickly)


Prints a line on the screen (assumes position is set as intended)


This is for text that flows Right to Left


These commands scroll the display without changing the RAM


These commands scroll the display without changing the RAM

setCursor(row, col)[source]

Set current input cursor to row and column specified

Glue logic functions


Not for user interaction, are called by main.py, which is pyLCI launcher.


This function is called by main.py to read the output configuration, pick the corresponding drivers and initialize a Screen object.

It also sets screen global of output module with created Screen object.