Hardware Reference
In-Depth Information
Choosing a Unique Static IP Address
You should be sure to pick an IP address that is not already in use by any other
devices on your network. Otherwise, your network connection will not work prop-
erly. When DHCP is in use, duplication is prevented, but it is possible to accidentally
do it when setting the IP statically.
Additionally, you will need to manually specify a DNS server when setting a static IP
address. DHCP configurations usually configure the DNS server for you, but there is
no way for a static IP configuration to know what the DNS server is. To set the DNS
server, edit /etc/resolv.conf (as root), and add the following line:
nameserver 11.23.58.13
Replace 11.23.58.13 with the IP address of your DNS server. If you have multiple DNS
servers, you can have multiple nameserver $IP lines in this file.
After saving your changes, restart networking for the new settings to take effect:
$ su -c '/etc/init.d/networking restart'
You now have a static IP address that won't change each time you access the Internet.
Learn to Speak GPIO
HACK 14
GPIO stands for General-Purpose Input/Output, and its presence on your
Raspberry Pi makes many hacks in this topic possible. This hack helps
dymystify it.
The Raspberry Pi contains standard connectors that you are probably familiar with
(Ethernet, HDMI, audio, and USB), but it also includes 26 pins (in two rows of 13) that
are intended to connect directly to lower level devices. These pins are called the GPIO
(general-purpose input/output) pins, because they are programmable input/output
pins intended for a wide range of purposes.
Practically, this means we can use the GPIO pins to connect almost anything to a
Raspberry Pi. The header of these pins is labeled on the Raspberry Pi as P1, as shown
in Figure 1-5 .
 
Search WWH ::




Custom Search