caf_piface

0.1.0 • Public • Published

CAF (Cloud Assistant Framework)

Co-design permanent, active, stateful, reliable cloud proxies with your web app.

See http://www.cafjs.com

CAF Library to interact with PiFace using SPI

Port of python library in

https://github.com/thomasmacpherson/piface

to node.js/JavaScript (using https://github.com/RussTheAerialist/node-spi)

API

see lib/main.js jsdoc

>  pif = require('caf_piface')
   { PiFace: [Function] }
>  p = new pif.PiFace()
   { spi: { _spi: {}, device: '/dev/spidev0.0' } }
> p.init()
  undefined
> p.write(1,7)
  true
> p.readOutput(7)
  1
> p.readOutput()
  128
> p.read()
  0       // no button pressed
> p.read()
  8       // pressing fourth button
> p.shutdown()

Configuration Example

framework.json

None

ca.json

None

Readme

Keywords

none

Package Sidebar

Install

npm i caf_piface

Weekly Downloads

1

Version

0.1.0

License

none

Last publish

Collaborators

  • antlai