Hardware Reference
In-Depth Information
Chapter 1
Preparation
While it is assumed that you've already started with the Raspberry Pi, there may be a few
things that you want to do before working through the rest of this topic. For example, if
you normally use a laptop or desktop computer, you may prefer to access your Pi from
there. Consequently, some of the preparation in this chapter pertains to network access.
If you plan to do most or all of the projects in this topic, I highly recommend using
something like the Adafruit Pi Cobbler (covered later in this chapter). This hardware breaks
out the GPIO lines in a way that you can access them on a breadboard. If you're industrious,
you could build a prototyping station out of a block of wood. I took this approach but would
buy the Adafruit Pi Cobbler if I were to do it again (this was tedious work).
Static IP Address
The standard Raspbian SD card image provides a capable Linux system, which when
plugged into a network, uses DHCP to automatically assign an IP address to it. If you'd
like to connect to it remotely from a desktop or laptop, then the dynamic IP address that
DHCP assigns is problematic.
There are downloadable Windows programs for scanning the network. If you are
using a Linux or Mac host, you can use Nmap to scan for it. The following is an example
session from a MacBook Pro, using the MacPorts collection nmap command. Here a range
of IP addresses are scanned from 1-254:
$ sudo nmap −sP 192.168.0.1−254
Starting Nmap 6.25 ( http://nmap.org ) at 2013−04−14 19:12 EDT
. . .
Nmap scan report for mac (192.168.0.129)
Host is up.
Nmap scan report for rasp (192.168.0.132)
Host is up (0.00071s latency).
MAC Address : B8:27:EB:2B:69:E8 (Raspberry Pi Foundation)
Nmap done : 254 IP addresses (6 hosts up) scanned in 6.01 seconds
$
In this example, the Raspberry Pi is clearly identified on 192.168.0.132, complete
with its MAC address. While this discovery approach works, it takes time and is
inconvenient.
 
Search WWH ::




Custom Search