Raspberrypi

From ElateWiki

Pi-logo.jpg


Contents

Introduction

The Raspberry Pi is a credit-card-sized, single board computer that was developed in the United Kingdom. It serves as a bare-bones developer platform that enables users to write their own programs. The device was originally developed for the purpose of stimulating the teaching of basic computer science in schools. 

The Raspberry Pi officially launched in late February of 2012. The initial demand was so great that websites offering the device stalled due to heavy traffic and users’ constant refreshing of their browsers.

While the device’s performance leaves something to be desired in terms of processing power, it can have many applications.  For example, the Raspberry Pi can be used as a media center, mobile lab, or to run a basic Linux server.


Setting up your Raspberry Pi

  • Components:
    • 5v micro-USB power adapter (i.e., a smartphone charger)
    • SD card (4GB to 32GB recommended).
    • USB keyboard and mouse
    • Ethernet cable
    • HDMI cable (DVI adapter if needed)

 

Required software

Setting up your SD card

  • Download the Raspbian “wheezy” 2012-10-28-wheezy-raspbian.zip from http://www.raspberrypi.org/downloads
  • Extract the image file 2012-10-28-wheezy-raspbian.img from the downloaded .zip file
  • Insert the SD card into your SD card reader and note the drive letter it was assigned. If the card is not new, you should format it
  • Download the Win32DiskImager utility from https://launchpad.net/win32-image-writer
  • Extract the executable from the zip file and run the Win32DiskImager utility. You should run the utility as Administrator
  • Select the 2012-10-28-wheezy-raspbian.img image file you extracted earlier
  • Select the drive letter of the SD card in the device box. Be sure to select the correct drive.
  • Click “Write” and wait for the write to complete
  • Exit the imager and eject the SD card
  • Insert the card into the Raspberry Pi, power it on, and it should start up. If you have used an SD card that is larger than 4 GB, an option appears to expand the partitions to use all of the card.
  • For default login, type Username: pi and Password: raspberry
  • To load the LXDE desktop, type “startx” in the command line and press “Enter”

You should see a screen that looks like this:

Lxde-screen.jpg

 

 

First Program

Your OS comes preloaded with Python. We'll use this programming software to write your first (or not) code.

First, start IDLE 3 (icon on your LXDE desktop). The window that opens should look something like this...

Python1.jpg

Click File > New Window and type in:

#my first program
team = input("Hello, I'm Raspberry Pi. What is your favorite team? ")
print ('Go ' + team + ' !')

Python2.jpg

Click Run > Run Module or press F5. It will ask you to save your program. Save it anywhere.

When run window opens, type in "Wildcats" and press enter. Congratulations, you just wrote your first program (or nor) with Python!

Python3.jpg


Projects

Do you like what you've seen so far? No need stop here. There are thousands of applications for the Raspberry Pi. While some are a bit more advanced, like a mobile lab on a weather balloon, others can be much simpler. Check out http://elinux.org/RPi_Projects for some well detailed projects, or search the web for whatever the geek in you desires.

Here is one of our favorites:


Sources