Building sensor networks is economical if a microcontroller hosts the sensors. However, sometimes the computational power a microcontroller offers is not adequate. For instance, it may be necessary to convert the data to a different format, print a hard copy of the sensor data, or incorporate the data within an application. What you need is a computer that not only has more processing power, but also allows the use of common applications, affords access to peripherals, and permits the use of scripting languages.
Although the use of an inexpensive personal computer would be of great advantage here, using them as sensor nodes in the networks has its own disadvantages. The primary hurdle is most personal computers are built for use as servers or desktop computers, and almost no general-purpose input/output ports are available. Of course, a data collection card added to the personal computer will serve the purpose, but the cost of the computer added to that of the data-collection card makes the cost of the sensor node uneconomical.
Fortunately, single board computers such as the Raspberry Pi (RBPi) provide an easy solution to the above problem. With sufficient processing power and memory, use of standard peripherals, supported programmable I/O ports, and a small form factor, the RBPi is the most suited for building sensor networks economically.
Essentially, the RBPi is a single board computer that runs Linux as its operating system. To get started with the RBPi, you need a few additional things, such as a USB power supply rated at 2 A with a male micro-USB connector, an HDMI monitor, a keyboard, an optional mouse, and most importantly, an SD card to hold the OS.
The most commonly used operating system for the RBPi is the Raspbian image provided by the Raspberry Pi Foundation on their download page. Once you have downloaded the image, you will have to unzip it and write it into an SD card. The easiest way to do this with a Windows PC is to use the Win32 Disk Imager software. Those on the Mac OS X or the Linux PC may use the dd command.
Now it is time to boot up your RBPi board. Plug in the SD card holding the new image, plug in the keyboard, mouse, and the monitor. Once all the peripherals are in place, plug in the USB power and turn on the power. When prompted to enter a username and password, use Pi and raspberry respectively, and configure the system to your requirement.
For connecting and experimenting with sensors, you may use expansion boards, but using a simple prototyping board instead is more flexible. Using a Pi Cobble Breakout board or similar allows a simple ribbon cable from the GPIO connector on the RBPi to the prototyping board, with the pins arranged in the same order as those on the RBPi are.
Be careful to make or change connections with the RBPi powered off. Also double-check all connections are rightly connected. The GPIO on the RBPi is not protected against short circuits and high voltages, and is easily damaged.