nrc

node-red-contrib-mpr121

Node for interacting with MPR121 with node red

Showing:

Popularity

Downloads/wk

6

GitHub Stars

0

Maintenance

Last Commit

8mos ago

Contributors

1

Package

Dependencies

1

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

node-red-contrib-mpr121

Nodes for interacting with MPR121

The package provide two different node:

  • mpr121-i: Interrupt driven node
  • mpr121-p: Polling driven node

##Install

npm install node-red-contrib-mpr121

##Interrupt The interrupt node provide a 12 different output, one per pin.

The output send two different message, one for touch, one for release.

The payload contains two values:

  • type: the type of event [touch, release]
  • pin: the number of the pin [0..11]

Message for touch event

var msg = {
    payload : 1 ,
    action : "touch",
    pin : pin,
    address : parseInt(config.address),
    i2cbus : parseInt(config.i2cbus)
}

Message for release event

var msg = {
    payload : 0 ,
    action : "release",
    pin : pin,
    address : parseInt(config.address),
    i2cbus : parseInt(config.i2cbus)
}

###Usage Add the node like this

mpr121-i

##Polling The polling node provide a 12 different output, one per pin.

The output send three different message, one for touch, one for release and one for value.

The payload contains two values:

  • type: the type of event [touch, release, value]
  • pin: the number of the pin [0..11]

Message for touch event

var msg = {
    payload : 1 ,
    action : "touch",
    pin : pin,
    address : parseInt(config.address),
    i2cbus : parseInt(config.i2cbus)
}

Message for release event

var msg = {
    payload : 0 ,
    action : "release",
    pin : pin,
    address : parseInt(config.address),
    i2cbus : parseInt(config.i2cbus)
}

###Usage Add the node like this

mpr121-i

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100