for pin in 16 17 18 19 20 21 22 23 24 25 26 27; do
echo $pin > /sys/class/gpio/export
chown -R pi /sys/class/gpio/gpio$pin
chmod -R g+w /sys/class/gpio/gpio$pin
After running the script, the virtual directories, one for each pin in the script, are created:
Looking into one of the virtual directories, we can see the following files and directories are created:
Now that the Access Errors are out of the way, I can finally get to the meat of the problem, and start using Erlang to actually do something. I plan to create modules using the Erlang gen_server behavior for each pin and control algorithm, and pass values between the various processes with messages.