# node-red-piface

> Node-RED nodes to read from and write to a PiFace Digital Raspberry Pi add-on board

Latest version **1.0.0** (published 2016-03-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-red-piface
pnpm add node-red-piface
yarn add node-red-piface
bun add node-red-piface
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-03-08 |
| First published | 2016-03-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | ced-dev |
| Maintainers | ced-dev |
| Keywords | node-red, piface |

## Links

- npm: https://www.npmjs.com/package/node-red-piface
- Repository: https://github.com/ced-dev/node-red-piface
- Homepage: https://github.com/ced-dev/node-red-piface#readme
- Issues: https://github.com/ced-dev/node-red-piface/issues
- npm.io page: https://npm.io/package/node-red-piface

## Dependencies (1)

- [piface](https://npm.io/package/piface.md) >= 2.0.0

## Recent versions

- 1.0.0 (latest) — 2016-03-08

## README

node-red-piface
====================

<a href="http://nodered.org" target="_new">Node-RED</a> nodes to control a
<a href="http://www.piface.org.uk/products/piface_digital/" target="_new">PiFace Digital</a>
add-on board for a Raspberry-Pi.

**Note:** Some later versions of the PiFace relabelled the switch inputs to be `0 - 7`
instead of `1 - 8` as on the original boards.
We cannot automatically detect this so the user will have to apply some common sense.

Install
-------

Run the following command in your Node-RED user directory - typically `~/.node-red`

    npm install node-red-piface


Pre-reqs
--------

Device Tree **must** be turned off. To do this run

    sudo raspi-config

then select the `Advanced Options`, then `Device Tree`, and finally select `No`
and `OK`. You will then need to reboot.


Usage
-----

A pair of input and output Node-RED nodes for the Raspberry Pi PiFace Digital
add-on board.

### Output

The PiFace output node will set the selected relay, LED, or pin on or off
depending on the value passed in. Expects a `msg.payload` with either a
1 or 0 (or true or false).


### Input

The PiFace input node generates a `msg.payload` with either a 0 or 1
depending on the state of the input pin.

The `msg.topic` is set to <i>piface/{the pin number}</i>

<b>Note:</b> This node currently polls the pin every 100ms.

---
_Source: https://npm.io/package/node-red-piface · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
