Basic LCD driver class (HD44780)
Posted: Wed Oct 22, 2014 6:39 pm
I've put together a very simple class to get a 4-bit LCD up and running quickly. Code based on this RPi version http://www.raspberrypi-spy.co.uk/2012/0 ... ng-python/.
Usage
https://github.com/wjdp/micropython-lcd
Usage
Code: Select all
lcd = HD44780()
# Pins 0-5 as above
lcd.PINS = ['Y1','Y2','Y3','Y4','Y5','Y6']
# Initialise display
lcd.init()
# Use it
lcd.set_line(0) # First line
lcd.set_string("ABCDEFGHIJKLMNOP") # Send a string
lcd.set_line(1) # Second line
lcd.set_string("1234567890123456") # Again
pyb.delay(3000) # 3 second delay
# Done
lcd.clear()