I installed the PiFace daughterboard on the Raspberry Pi and then installed WiringPi to make it easier to access
WiringPi comes with a separate program to help manage the on-board GPIO interface as well as additional modules such as the PiFace and other devices like the Gertboard as well as generic GPIO expander type devices.
This program, called gpio, can also be used in scripts to manipulate the GPIO pins – set outputs and read inputs. It’s even possible to write entire programs just using the gpio command in a shell-script, although it’s not terribly efficient doing it that way… Another way to call it is using the system() function in C/C++ or it’s equivalent in other programming languages.
[From The GPIO utility | Wiring Pi]
If I now issue the command “gpio -p write 200 1” LED 0 on the board tuns on – and “gpio -p write 200 0” turns the same LED off.
All good so far.
Then I installed the “wiring” gem – but it seems (as of todays date) to not work with the PiFace board (does not allow use of any of the pin numbers associated with the board), so I ended of with a very short ruby script to test access :
Shell.execute(‘gpio -p write 200 1 ‘).success?
Shell.execute(‘gpio -p write 200 0 ‘).success?
I did install the gem “shell_executer” first of course…And it works.
Fairly cumbersome for reading dynamic events of course – but that’s next step.