pcd8544_rpi

Node.js binding of PCD8544 LCD screen driver for Raspberry-Pi


Keywords
PCD8544, Raspberry-Pi, LCD
License
MIT
Install
npm install pcd8544_rpi@0.1.1

Documentation

Node-PCD8544-RPI

Node.js binding of PCD8544 LCD screen driver for Raspberry-Pi.

Hardware

I used the PCD8544 from www.sunfounder.com, designed to be mounted on the GPIO ports of a Raspberry-Pi:

This Node.js module uses the predefined pin layout, and is not configurable for now:

Installation

Install wiringPi driver

This package makes use of WiringPI-library of Gordon Henderson (https://projects.drogon.net/raspberry-pi/wiringpi/).

$ cd /home
$ git clone git://git.drogon.net/wiringPi
$ cd wiringPi
$ sudo ./build

Install the package from the repository

$ npm install https://github.com/pevandenburie/node-pcd8544-rpi.git

Example

Create a test_lcd.js file and edit it:

const lcd = require('pcd8544_rpi');

lcd.init();
lcd.clear();
lcd.drawstring(0, 0, "Hello Raspi!");
lcd.display();

Then run it in sudo mode, as it is required to control GPIOs on Raspberry-Pi:

$ sudo node ./test_lcd.js

Look at your screen: the first line should be filled with "Hello Raspi!".