node-red-contrib-mpr121 1.0.0

Node for interacting with MPR121

npm install 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 istall 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 : {
    type : "touch",
    pin : pin
  }
}

Message for release event

var msg = {
  payload : {
    type : "release",
    pin : pin
  }
}

###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 : {
    type : "touch",
    pin : pin
  }
}

Message for release event

var msg = {
  payload : {
    type : "release",
    pin : pin
  }
}

Message for value event

var msg = {
  payload : {
    type : "value",
    pin : element
  }
}

###Usage Add the node like this

mpr121-i

Node Info

Version: 1.0.0
Updated 1 year, 9 months ago
License: MIT

Downloads

1 in the last day
4 in the last week
22 in the last month

Nodes

  • mpr121-i
  • mpr121-p

Keywords

  • node-red
  • mpr121
  • onoff
  • i2c-bus
  • gpio
  • raspberry
  • pi
  • raspberrypi

Maintainers

  • grande.emme