u-tunis-el-manar / lcdpigpio

An i2c 1602 LCD driver based on pigpio library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A C++ 16x2 LCD library using i2c

An i2c 1602 LCD library written in C++ and it is based on pigpio library for Raspberry OS It uses the i2c expander PCF8574.

Usage

Assuming pigpio library is installed, simply add class files to your project.

After initialization of pigpio library, it is possible to create an instance of LCD. It is sufficient to precise the i2c bus and the address of PCF8574.

if (gpioInitialise() < 0) {
	cout << "Failure..." << endl;
	exit(-1);
}

LCD lcd(1, 0x27); `` 

By default, the display will be on and no cursor is displayed

To enable cursor, use lcd.enableCursor(), or lcd.enableCursor(true)

To disable cursor, use lcd.enableCursor(false)

About

An i2c 1602 LCD driver based on pigpio library

License:GNU General Public License v3.0


Languages

Language:C++ 100.0%