Hardware Reference
In-Depth Information
Solution
Reading a GPIO Pin via sysfs
wire a switch to
P9_42
.) First, you need to map the
P9
header location to GPIO number
Figure 7-1. Mapping P9_42 header position to GPIO 7
Next, change to the GPIO
sysfs
directory:
bone#
cd /sys/class/gpio/
bone#
ls
export gpiochip0 gpiochip32 gpiochip64 gpiochip96 unexport