About
Simple wrapper for the PiFace Digital and NodeJS (v4+ or v5+)
Installation
Note: recent Kernel versions need Device-Tree to be disabled in order to use SPI.
- Install NodeJS
Follow the instructions available here: https://nodejs.org/en/download/package-manager/
- Download, build and install the C libraries
sudo apt-get install automake libtool git
git clone https://github.com/thomasmacpherson/piface.git
cd piface/c
./autogen.sh && ./configure && make && sudo make install
sudo ldconfig
cd ../scripts
sudo ./spidev-setup
- Install the PiFace NodeJS module
npm install piface
- Usage
var pfio = ; pfio;var i = 0;for i = 0; i < 8; i++ console; i = -1; { i++; console; pfio; if i < 8 ; };
- Methods
pfio;pfio;var val = pfio; // returns 0 or 1pfio;var val = pfio; // returns 0..255var val = pfio; // returns 0..255pfio;