i2c LCD
i2c LCD module using PCF8574P for raspberry pi
Install
npm instal i2c-lcd
Hardware
Testd with:
- 2004 LCD Display Module HD44780 (20x4)
- 1602 LCD Display Module HD44780 (16x2)
Usage Example
LCD = require"./lcd" lcd = "/dev/i2c-1"0x27lcdinitthen -> return lcdcreateChar0 0x1b0x150x0e0x1b 0x150x1b0x150x0e then -> return lcdcreateChar1 0x0c0x120x120x0c 0x000x000x000x00 then -> lcdhome then -> lcdprint"Raspberry Pi " then -> lcdsetCursor01 then -> lcdcursorUnder delay4000then -> d = s = dtoString return lcdsetCursor00 then -> lcdprints then -> lcdsetCursor01 then -> lcdprintssubstring16 delay4000then -> lcdoff done
This allows you to drive a 1602 LCD module using only 4 pins on the raspberry pi