The Raspberry Pi is a great development platform if you would like to work in a more computer like environment or need more power than what an Arduino or another low powered microcontroller can provide. This tutorial will walk through collecting the necessary components and setting up the Raspberry Pi for the first time.
- Raspberry Pi Model B/B+ or Raspberry Pi 2 - The models B/B+ are the older versions of the Raspberry Pi. The Raspberry Pi 2 is the newest version of the Raspberry Pi and offers much more speed than the original versions.
- 8+ GB Micro SD Card with Adapter - Using a micro SD card instead of a normal SD card lets you swap between the model B and model B+ without having to re-configure a new SD card. An OS that is originally configured for the original Raspberry Pi will not be able to be used on the Raspberry Pi 2 and vice-versa.
- SD Card Reader
- 2A Micro USB Power Adapter
Step 1: Download the Software
Download the zip file of the Raspian Jessie distro from the Raspberry Pi website The download is pretty big (about 1.3 GB) so depending on your internet speed the download might take a while. After the download of the OS is complete, extract the .img file from the zip file. This is the file that is going to be loaded onto the SD card.
Step 2: Install OS on SD Card
Connect the SD card to your computer using an SD card reader. Make note of the drive letter of the SD card once it mounts. To load the image onto the SD card download the Win32DiskImager, install the program and run it. Browse for the OS image file by clicking the folder icon in Win32 Disk Imager
Choose the correct drive letter for the SD card reader. Once both have been chosen click write. A new message will pop up warning you that you are going to format the disk at the drive letter chosen.
**Make sure that the correct drive letter is chosen, all of the data on the drive will be erased**
Click OK. The write process will take a couple of minutes depending on the speed of your SD card. Once the write process is complete dismount the SD card and load it into the Raspberry Pi. Connect the Raspberry Pi to your network router using an Ethernet cable. Power on the Raspberry Pi and wait about a minute for it to fully boot up.
Step 3: Determine the Raspberry Pi IP Address
We are going to ssh into the Raspberry Pi to set it up so that you do not need a separate display, keyboard and mouse. In order to SSH into the raspberry pi we will need to know the IP address of the pi and an SSH client. In order to figure out the IP address we will use Advanced IP Scanner. Download this program and run it. Press play at the top of the window and the program will scan all of the devices attached to the network.
Once it is complete, look though the list and find a listing with the name "raspberrypi” and the manufacturer “Raspberry Pi Foundation”.
Write down the IP address for the Raspberry Pi. If you do not see an entry for the Raspberry Pi make sure that that your computer is on the same network as the Raspberry Pi.
Step 4: Configure SSH Client
The SSH client we will use to talk with the Raspberry Pi is puTTY. Download puTTY and run it. Click on Session in the Category pane and in the Host Name (or IP address) text bar enter the IP address that was copied from Advanced IP Scanner here. Click on Open at the bottom of the window to open the console window.
Note: Before clicking Open enter a name into the Saved Sessions text bar and click Save. This will save the IP address so that it doesn’t need to be entered manually each time you start puTTY.
A command window should open up and a prompt for a username should display in the console window. If the command window is blank or you get a timeout error verify that the computer you are using is on the same network as the Raspberry Pi, that the IP address entered is correct and that the Raspberry Pi is powered and booted up.
Step 5: Log-in and Configure Raspberry Pi
In the console window for the username type:
and press Enter. For the password prompt type:
and press Enter. The initial command prompt will then show up on the screen.
Next, we will expand the SD card memory space to use the whole memory card. In the command prompt type:
If you are prompted for your password type the default password from before. This command will launch the Raspberry Pi Software Configuration Tool. Chose Expand Filesystem at the top of the list and press Enter.
A new prompt will pop up saying that the partition will be resized at the next reboot. Press Enter to exit the prompt. Once returned to the Configuration Tool scroll down and select Finish. A prompt will then pop up asking you if you would like to reboot. Select Yes and press Enter.
You will then be disconnected from your SSH session while your Raspberry Pi reboots. Wait a minute for your pi to reboot (Step 4) and restart puTTY and log back into your Raspberry Pi. At the command prompt type:
sudo apt-get update
After the command prompt reappears type:
sudo apt-get upgrade
These two commands will make sure that your Raspberry Pi is updated to the latest software. Type Yes or Y for any prompts to continue.
Congatulations! You have completed the basic setup of the Raspberry Pi for "Headless" use.