Hardware Reference
In-Depth Information
Figure 5-8. The finished circuit on my breadboard
That's it! Turn on your Raspberry Pi and wait for nothing to happen. After all, there is nothing for the Raspberry Pi
to detect: the pressure mat is just a big switch.
Using the GPIO Pins
To use the GPIO pins with the pressure mat, you're going to need to log in to your Raspberry Pi as root. Where are the
GPIO pins? I can't see them under /sys/class/gpio/ in Figure 5-9 .
Figure 5-9. Where are my GPIO pins?
By default the GPIO support that is built into the kernel will not export any GPIO pins to the operating system.
After all there is no way for Linux to know what you have connected to each pin. So you are going to need to export
your GPIO pin before you can work on it. This is simple: first, you need the number of the GPIO pin (not the physical
pin number but the logical GPIO number); in your case this will be GPIO-04. In Figure 5-9 you can see two special
 
Search WWH ::




Custom Search