Socket
Socket
Sign inDemoInstall

piface-node

Package Overview
Dependencies
79
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    piface-node

Raspberry Pi Piface Addon


Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

About

Interface to the Raspberry Pi Piface board using Node.js. This addon shouldn't require any sudo or root privileges to run, as long as your user is in the "spi" group on your Pi.

Note: I've been playing a bit too much with the Pi, so these notes might be missing a few steps.

Installation

Get the Piface C libraries

First, you'll need the C libraries, available here. Follow the "C" library installation, naturally.

Get the NPM module

$ npm install piface-node

A note on running Node.js on the Raspberry Pi

It's not quite as easy to install Node.js on a Raspberry Pi as it is on other platforms, so you might need to dig around to find the newest available version for the Pi's architecture. At the time I write this, the latest available packaged build for Raspberry Pi is v0.10.17. v0.10.17 is the only version I've tested this on, but if you have success on other versions, please let me know!

Using piface-node

I've intended this to be used with the full awesome power of Node's EventEmitter. You can easily wire up the physical I/O on the Piface with pretty much anything.

Here's a basic example of the usage, in lieu of actual documentation. There are also a few examples in the examples folder.

var pfio = require('piface-node');
pfio.init();
pfio.digital_write(0,1); // (pin, state)
var foo = pfio.digital_read(0); // (pin; returns state)
pfio.deinit();

Keywords

FAQs

Last updated on 06 Oct 2013

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc