Raspberry Pi Computer

A series of ARM based single board computers developed to promote teaching basic computer science in schools and developing countries. Cost is between $25 and $35 for the board, without power, SD Card, and other critical items, although a full system can easily be made for less than $100 with reasonable performance. Processors range from 700MHz single 32 bit to 900MHz quad core. A powerful GPU (24 GFLOPS) is also included with multiple video outputs. They typically run an OS based on Linux (although a minimal version of Windows is also available^) with scripting in Python or GCC compiled C or C++.

In general, the Pi is NOT designed to do real time processing, and so is best paired with an Arduino, PIC, or other uC for lower level device control. The Pi should be used to provide high level control, via ROS and do high level processing (e.g. OpenCV) and leave time critical tasks to smaller processors via I2C, serial, or other IO methods.

Raspberry Pi Model Specifications

Note, the Compute module column refers to the bare Compute module, not connected to any IO board.
Feature Model A Model B Model A+ Model B+ Compute Module Zero
BRCM2835 SoC Yes Yes Yes Yes Yes Yes
Standard SoC Speed 700Mhz 700Mhz 700Mhz 700Mhz 700Mhz 1GHz
RAM 256MB 512MB* 256MB 512MB 512MB 512 MB
Storage Full SD Full SD Micro SD Micro SD 4GB eMMC Micro SD
Ethernet 10/100 No Yes No Yes No No
HDMI output port Yes Yes Yes Yes Yes mini
Composite video output Yes Yes On 3.5mm jack On 3.5mm jack Yes unpopulated
Number of USB2.0 ports 1 2 1 4 1 1 OTG
Expansion header 26 26 40 40 N/A unpopulated
Number of available GPIO 17 17 26 26 48 26?
3.5mm audio jack Yes Yes Audio/Video Audio/Video N/A N/A
Number of camera interface ports (CSI-2) 1 1 1 1 2 N/A
Number of LCD display interface ports (DSI) 1 1 1 1 2 N/A
Power (bare, approx, 5v) 300mA, 1.5W 700mA, 3.5W 650mA, 3W 160mA
Size 85 x 56 x 15mm 85 x 56 x 17mm 65 x 56 x 12mm 85 x 56 x 17mm 62 x 30 x 3mm 65 x 30 x 5mm

Setup

To setup a Raspberry Pi, you need a computer, an SD card slot, a USB cable / power cord, and an Internet connection. You can also use the NOOBs system ^ to boot the Pi and then download one of several operating systems into the device. This requires a good external internet connection on the Pi which may not be available and is inherently unsecure. The method used here does not require the Pi to be exposed to the external internet.

On a Windows PC, you will also need an imaging program like:
http://sourceforge.net/projects/win32diskimager/
and a telnet program like
http://www.putty.org/

  1. http://www.raspberrypi.org/downloads , scroll down to the "Raspian" section and find the latest version of the image. It will be something like year-mm-dd-name-raspian.zip
  2. Extract the .img file from the .zip file and open it in the disk imaging program.
  3. Write the image to the SD card... this will take several minutes.
  4. Insert the SD card into the Pi, and connect power. (Note: Don't remove power without propery shutting down the OS e.g. sudo shutdown -t)
  5. Wait a minutes to give the Pi time to boot. Note: the default username is "pi" and password is "raspberry"

If you have a keyboard and monitor connected, you should see the standard Debian startup and be prompted to log in. If you want to connect "headless" to the Pi without using a local keyboard and monitor, be sure you have a working network connection (via ethernet or wifi) and then proceed as follows:

  1. Find the IP address of the Pi using one of the following methods: ^
  2. Telnet into the Pi from your PC. On Linux: ssh pi@<ip address> or putty to the IP address on port 22.
  3. Login when prompted.

Configuring wifi:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Go to the bottom of the file and add:

network={
    ssid="Your_Network_SSID"
    scan_ssid=1
    psk="Your_wifi_password"
}

You can have multiple network entries.

If it doesn't automatically connect, try
sudo ifup wlan0
or restart:
sudo shutdown -r now

Good luck getting it to stay connected to wifi.

Notes:

Note: When working from the command prompt, especailly remotely, you may find the "screen" program very useful:
sudo apt-get install screen
press ctrl+a from the prompt to activate screen, then one of: ? for help, c to make a new "window", n to switch to the next window, d to drop back to shell. You can run screen -r to see a list of windows and screen -r window to re-attach to a dropped window.

For more step by step instructions see: Embedded Computing 101: Raspberry Pi Fundamentals

Add items to the menu by editing .desktop files in /usr/share/raspi-ui-overrides. It may help to sudo pcmanfm and then right click the files and select properties for a nice user interface. Keepin in mind, the home "pi" folder is actually under /home/pi.

Development

You can write programs for the Pi on the Pi... most Pi OSs have a C/C++ compiler or Python scripting pre-installed. Writing code can be as easy as making a folder, editing a source file, (see Linux Documentation) and compiling with:
gcc <code file> -o <application file>
chmod +x <application file>

For more step by step instructions see: Embedded Computing 101: Raspberry Pi Fundamentals start at Slide 10

Web Development

Google Coder

OpenCV Vision

Installing OpenCV on a Raspberry Pi

ROS (Robot Operating System)

Installing ROS on a Raspberry Pi

See also: