GPIO modules
The BeagleBone Black has up to 69 different GPIO pins available on its expansion headers. These GPIO signals are controlled through four separate 32-signal GPIO modules, named GPIO0, GPIO1, GPIO2, and GPIO3. Each pin can either be put into output mode, where it can then be set to a 3.3 V high level or a 0 V low level, or input mode, where it can sense whether the level on the pin is high or low.
Kernel drivers
The GPIO modules inside microprocessors are typically controlled by reading and writing their memory registers directly. Like many other single board Linux computers, the BeagleBone provides a kernel driver which interacts with the GPIO memory registers for you, and is controlled via a sysfs
interface.
Note
Sysfs
is a virtual file system in the Linux kernel, consisting of special virtual files that provide input to and output from kernel drivers for configuring and controlling buses and devices.
The sysfs
entries for the BeagleBone Black's GPIO driver reside in /sys...