This application is an Erlang wrapper around the WiringPi library.
Start by downloading and installing the WiringPi library.
Then it should be possible to build wpi using rebar.
Before starting, you need to include a hrl file which defines some useful constants (matches those of WiringPi):
Then you can start setting up the pins and use them:
Pin = 4, wpi:gpio_mode(?WPI_MODE_GPIO), wpi:pin_mode(Pin, ?WPI_OUTPUT), wpi:digital_write(Pin, ?WPI_HIGH),
This NIF is entirely experimental - use at your own risk. It has been used to both write to (LED) and read from (button) pins successfully, while some functionality may be untested.
Contributions are more than welcome.
Credits go to Gordon Henderson for the WiringPi library.