Skip to content

Instantly share code, notes, and snippets.

@ufux
ufux / lcdui.py
Created July 27, 2013 14:08
Created a working driver to drive a LCD 20x4 display based on HD44780U (http://www.exp-tech.de/Displays/I2C-LCD-1602-Module-652.html) via PCF8574 i2c bus expander driven from a raspberrypi.
import smbus
import getopt
import sys
from time import *
from time import gmtime, strftime
# TODO: Factor out all device_write calls to some PCF8574 specific module ...
# will be different with another io expander
# communication from expander to display: high nibble first, then low nibble