PiFaceCAD output driver

This driver works with PiFace Control and Display Raspberry Pi shields.

Sample config.json section:

"output":
   [{
     "driver":"pfcad"
   }]

Note

Generally, you won’t need to edit config.json if you’re using this shield because it’ll be done automatically by config.sh.

class output.drivers.pfcad.Screen(rows=2, cols=16)[source]

A driver for PiFace Control and Display Raspberry Pi shields. It has a simple 16x2 LCD on it, controlled by a MCP23S17 over SPI.

Doesn’t yet conform to HD44780 library specs, many functions are not transferred from the pifacecad library.

TODO: rewrite it to remove dependency on PiFaceCAD library.

__init__(rows=2, cols=16)[source]

Initialises the Screen object.

Kwargs:

  • rows (default=2): rows of the connected display
  • cols (default=16): columns of the connected display
enable_backlight()[source]

Enables backlight. Doesn’t do it instantly, you’ll have to wait until data is sent to the display.

disable_backlight()[source]

Disables backlight.

clear()[source]

Clears the display.

display_data(*args)[source]

Displays data on display.

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