0.0.1 • Published 10 years ago

mcp23017 v0.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
10 years ago

MCP23017

node.js module to use MCP23017 16bit GPIO

Install

$ npm install mcp23017

Example

var MCP23017 = require('mcp23017');

var address = 0x20;
var mcp = new MCP23017(address, '/dev/i2c-1');

mcp.setGpioAPinValue(0,1); //set GPIO A Pin 0 to high
mcp.setGpioAPinValue(0,0); //set GPIO A Pin 0 to low
console.log(mcp.getGpioBPinValue(0)); //get GPIO B Pin 0 value

Notes

GPIO Port A is hardcoded as WRITE GPIO PORT B is hardcoded as READ