When modifying or working with Device Tree files, we frequently need to check pin usage so that we do not inadvertently try to write to claimed or unsuitable pins.
The following recipe employs two scripts that you can run with Node.js and helps us locate which pins are free. The scripts exist thanks to the coding work of Professor Mark Yoder at Rose-Hulman Institute of Technology.
You do not need anything more than your basic BBB kit for this recipe, which is a board connected to your host computer via USB.
To run this script, you need to follow these steps:
You first need to open up the Cloud9 IDE and create a new script called
freeGPIO.js
.If you ran the recipe Device Tree Basic Build earlier in this chapter, you will find the file
freeGPIO.js
in the directory that you got from our GitHub repo. This was available by running the following command:git clone https://github.com/HudsonWerks/device-tree.git
Otherwise, you...