This driver can be used for various Newhaven displays. Currently, the driver was designed and tested on the following :
Newhaven NHD-0420D3Z-FL-GBW
(Please see in the attachement section the links for the documentation of the display and the wiring).
The current driver operates in text mode and operates in an I2C connection. The code exists to support a serial connection as well, but isn't exposed.
Display Section
Display <name> { Driver 'Newhaven' Port <string> Device <string> Size <string> Brightness <number> Contrast <number> Icons <number> }
Parameters
Driver | 'Newhaven' |
Port | I2C device the display is attached to (e.g.'/dev/i2c-0') |
Device | I2C address to use (e.g.'40')(Newhaven documentation indicates 80, but 40 works for me) |
Size | <columns>x<rows> (e.g. '20×4') |
Brightness | initial brightness value, 1..8 (default: 6) |
Contrast | initial contrast value, 1..50 (default: 25) |
Icons | Number of user-defined chars reserved for Icons (default: 0) |
—-
Plugins
The driver provides the following functions:
LCD::Contrast(n) | sets the display contrast (1..50) |
LCD::Brightness(n) | sets the display brightness (1..8) |
—-
Examples
Display Newhaven { Driver 'Newhaven' Port '/dev/i2c-0' Device '40' Size '20x4' Brightness 6 Contrast 25 Icons 0 }