ikitchen-mcp23017
v0.0.2
Published
Module to use MCP23017 16bit GPIO
Downloads
1
Readme
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