empire-matrix-keypad

1.0.1 • Public • Published

Empire Matrix Keypad

This library will allow your Raspberry pi to read any matrix type keypad.

Install

  npm install empire-matrix-keypad --save

Usage

let Keypad = require('empire-matrix-keypad');

let config = {
	map: [
		[1, 2, 3],
		[4, 5, 6],
		[7, 8, 8],
		["*", 0, "#"]
	],
	rows: [26, 19, 13, 6],
	cols: [11, 9, 10]
}

let keypad = new Keypad(config);

keypad.on('keyPress', function(key) {
	console.log('Key Pressed: ' + key);
});

keypad.on('enteredPassword', function(password) {
	console.log('Password entered: ' + password);
});

process.on('SIGINT', function(){
	keypad.resetPins();
});

Readme

Keywords

none

Package Sidebar

Install

npm i empire-matrix-keypad

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

3.99 kB

Total Files

3

Last publish

Collaborators

  • empire99