I'm currently trying to use the PiFace Digital Board with my Raspberry Pi, I want to do this completely in javascript and Node Js. I have found that there is a piface-node module for Node Js and have installed it.
I now am trying out the example scripts that have written by the maker of this module, for some reason it isn't working. I am wonder if anyone has had any experience with this module and can point me in the right direction.
I navigate to the directory:
pi@raspberrypi ~/fyp/Node Js/node_modules/piface-node $ cd examples/
pi@raspberrypi ~/fyp/Node Js/node_modules/piface-node/examples $ ls
EventBus.js pfio.input.changed.js pfio.inputs.changed.js
example.js pfio.input.hold.js pfio.output.echo.js
Run this line:
pi@raspberrypi ~/fyp/Node Js/node_modules/piface-node/examples $ node pfio.input.changed.js
Then I get these errors:
ERROR: Can not open deviceERROR: Can not send SPI messageBad file descriptor
{ '0': 'pfio.inputs.changed', '1': 222, '2': 0 }
ERROR: Can not send SPI messageBad file descriptor
ERROR: Can not send SPI messageBad file descriptor
{ '0': 'pfio.inputs.changed', '1': 220, '2': 222 }
{ '0': 'pfio.input.changed', '1': 1, '2': false }
ERROR: Can not send SPI messageBad file descriptor
The Pi is the top range one, and it's getting powered from the plug rather than a USB port. So I assume that power isn't an issue.
I just want to get some lights flashing, and get some push buttons showing they've been clicked in the node output.
Thanks