Skip to content

x3itsolutions/mcp23017

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

node.js module to use MCP23017 16bit GPIO

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published