mcp23017

0.0.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i mcp23017

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • x3itsolutions