Sunday, 10 January 2016

How To Set Up The Raspberry PI 2 Model B

Posted by Gary Newell  |  at  12:12 3 comments

Introduction

This article is fairly late onto the scene but my original articles about the Raspberry PI are all becoming a little bit long in the tooth and so it is time to revisit them and make them relevant for 2016 and beyond.

In this guide I will show you how to buy a Raspberry PI, introduce you to some key accessories, introduce you to some non-key accessories and also show you how to set up the operating system.

Other guides will be following on from this to show how to connect using SSH and via VNC so that you don't need it plugged into a monitor/television.

What Is The Raspberry PI 2?

The Raspberry PI 2 Model B is the most powerful Raspberry PI on the market. Recently a new model called the Raspberry PI Zero was released to the market for an incredible £5 but the Raspberry PI 2 is the one that is most suitable for the average person. 

The Raspberry PI Model B is a single board computer with the following specifications:

  • A 900 MHz quad core ARM Cortex-A7 processor
  • 1 gigabyte of RAM
  • 4 USB ports
  • 1 HDMI port
  • 1 Micro SD Card slot
  • 40 GPIO pins
  • 1 Ethernet port
  • 3.5 mm audio and video jack combined
  • Camera interface
  • Display interface
  • Videocore IV 3D Graphics Core
The beauty of the Raspberry PI is that the price point is very low at around the £30 mark. The processor isn't the fastest and the amount of RAM is fairly meagre.

The Raspberry PI is an entry point computer which was initially launched for educational purposes but which has grown beyond the inventors' wildest imaginations.

I think the people that will benefit most from Raspberry PIs are children, especially older children or young teenagers.

When I was young I was given a Sinclair Spectrum +2 computer for Christmas and it was the best present I ever received as a child.

As with the Raspberry PI it wasn't the most powerful computer available but it introduced me to computers and also to programming.

I am now in my forties and I have to say that without the Sinclair Spectrum I may never have become a software developer and I probably wouldn't be writing this blog today.

The Raspberry PI will allow your children to learn basic electronics and it will also allow them to learn to program in a number of different programming languages such as Python and C.

With a Raspberry PI you can be safe in the knowledge that if the kids mess up the operating system you can always recreate it and install it again without having to buy a new disk or get expert help to fix it for you and viruses aren't even on the radar.

If you are an adult and you are wondering what a Raspberry PI can do for you then it really depends on your imagination. At its very basic form you can use it as a small desktop computer, an audio server, a file server, a mini web server, a way to make your TV smart or a retro games console.

How Can I Get A Raspberry PI 2?

You can buy the Raspberry Pi 2 Model B Desktop (Quad Core CPU 900 MHz, 1 GB RAM, Linux) on its own from Amazon for £25.99.

In reality though you will definitely need the following:


  • A powered USB hub
  • A USB keyboard
  • A USB mouse
  • An HDMI cable
  • A micro SD Card 
  • A screen (either a monitor or TV with a HDMI port)
  • A USB WIFI dongle
You will probably also want to have the following:
  • A power supply
  • A Case
Amazon have a Raspberry Pi 2 8 GB Desktop Starter Kit (Exclusive to Amazon) which contains the following:


  • Raspberry PI 2 Model B
  • SD Card with NOOBS pre-installed
  • A power supply
  • A case
  • An ethernet cable
  • An HDMI cable
The price of the starter kit is £50.

Is that a good deal? Let's break it down and try and get the whole wish list and see how much you can reasonably get it all for.

As I have shown you can get the Raspberry PI 2 Model B for £25.99.

 

An HDMI cable can be bought in most pound shops or supermarkets. If you want to buy it from Amazon it will cost £2.26.

If you want to keep the Raspberry PI next to your router then you can use an ethernet cable but personally I think a WIFI USB dongle is more useful.



It is worth getting the official Raspberry PI WIFI dongle so that you don't end up with driver issues. This one costs £8.

You will need a class 10 Micro SD Card for the Raspberry PI 2. These are more expensive than the class 4 SD cards which are found in most supermarkets but I bought one from Tesco with 16 gigabytes for £4.50 during their Christmas sale.


You can get a blank one on Amazon with 32 gigabytes of space for £6.43. This is blank and you will have to install the operating system yourself but you can read the rest of this guide to find out how. It really isn't very difficult and there is a good reason to do it yourself which I will get to later on.

Generally the Raspberry PI can be powered with a mobile phone charger similar to the ones that come with a Samsung Galaxy phone.



The official Raspberry PI site has recommended power supplies and you can buy one on Amazon for £5.87.


Finally there is the USB keyboard and mouse. On Amazon you can shop around and get them for as little as £8.91.

The final total therefore for everything you need is £57.46.

It is worth noting that whilst this puts the cost of buying a Raspberry PI in the initial stages more expensive than the £30 often touted you will only buy the additional items once. If you buy a second PI at a later stage because for whatever reason it breaks or because a newer model is released you won't need to buy the additional extras again.



A case can be bought for as little as £6.29 but you can again shop around and find one that you like.



The power from a single power supply will power the Raspberry PI but when you have a WIFI dongle, keyboard and mouse connected there might not be quite enough power to run them all.

For this reason it is worth getting a powered USB hub. If you intend to run the Raspberry PI as a headless server then you might not need the USB hub as the power supply is capable of running the Raspberry PI and a WIFI dongle.

Many of the components listed above can also be bought from the following sites:




Choosing An Operating System

This guide will focus on installing Raspbian. There are a number of other options available.

For example:

  • Ubuntu MATE
  • Ubuntu Snappy Core
  • Windows 10 IOT Core
  • OSMC
  • OpenELEC
  • PINET
  • RiscOS
I will write future guides about the other operating systems but for now lets concentrate on Raspbian because it is the best place to start.

How To Download Raspbian
























You will see options for:

  • NOOBS
  • Raspbian
NOOBS is the one recommended for most users but I am going to tell you to download Raspbian and there is a good reason why.

If later on you decide to buy the 7 inch touchscreen display then NOOBS will not work and so by choosing the right operating system now and the right image you are protecting yourself in case you buy add-ons later on which will definitely work with Raspbian but which are not guaranteed to work with other setups.

Click on the Raspbian link or alternatively visit https://www.raspberrypi.org/downloads/raspbian/























There are three versions available. The latest full version is Raspbian Jessie. Click on the Download Zip file.

Create Raspbian SD Card Using Windows

Double click on the zip file and extract the contents to the downloads folder.



To create the SD card your computer will need an SD card reader. If there isn't one built in then you can buy a card reader from most electrical and computing shops and even some supermarkets.


Insert the SD card into the SD card slot on your computer or into your SD card reader.



You will also need a program called Win32 Disk Imager which you can download from http://sourceforge.net/projects/win32diskimager/.

Click on the download link to download the file and save the file in your downloads folder.


Click on the downloaded file to start the setup wizard. Click "Next" to get past the welcome message.


Accept the license agreement and click the "Next" button.


Click "Next" to choose the default location for installing Win32 Disk Imager.


Click "Next" again to allow the default start menu folder to be created.


Click "Next" again to create a desktop icon.


Click "Install" to begin the installation of Win32 Disk Imager.


Uncheck the "View README.txt" box but leave the launch Win32DiskImager box checked.

Click "Finish".


Click on the folder icon and then click on the Raspbian img file in the downloads folder. The filename will appear in the image file text box next to the folder icon.

Choose the device for the SD card in the dropdown under Device.

Click "Write".

The process takes a few minutes to complete. 

Click "Exit" to finish.

Create Raspbian SD Card Using Linux

To create the SD card your computer will need an SD card reader. If there isn't one built in then you can buy a card reader from most electrical and computing shops and even some supermarkets.

Insert the SD card into the SD card slot on your computer or into your SD card reader.



Open a terminal and navigate to the Downloads folder.

Look for the image by typing ls *.zip 

To unzip the Raspbian image type the following:

unzip 2015-11-21-raspbian-jessie.zip

(Replace the 2015-11-21-raspbian-jessie.zip with the name of the downloaded file)

























An image file will be extracted from the zip file and this needs to be copied to the SD card.

To do so type the following:

sudo dd if=2015-11-21-raspbian-jessie.img of=/dev/mmcblk0 bs=8m

Replace the 2015-11-21-raspbian-jessie.img with the name of the img file extracted from the zip file and change the /dev/mmcblk0 to the destination SD card.



If you are using Ubuntu you can find the destination by running the disks application. 

Click on SD Card Reader and the name of the device will be shown.

Setting Up The Raspberry PI 2





















The image above shows the Raspberry PI 2 with all the ports listed.

To set up your Raspberry PI 2 insert your keyboard, mouse and USB WIFI dongle into the USB ports.

Insert one end of the HDMI cable into the HDMI port and the other end into the same shaped port on your television or monitor.

Insert the power cable into the power port. 

The Raspberry PI 2 does not have a power switch so unless your plug socket has a power switch the Raspberry PI 2 will attempt to boot as soon as you have attached the power cable. I recommend using a plug socket with a switch.






















The final step is to insert the micro SD card into the slot as indicated in the image above.

Make sure your monitor or television is on the appropriate HDMI channel and flick the power switch.

Your Raspberry PI should now boot into Raspbian.

Raspbian
























If everything has gone to plan you should now see a screen similar to the one above. 

Raspbian by default uses the LXDE desktop environment. It is fairly basic but that makes it lightweight and it complements the Raspberry PI perfectly.

At the top there is a single panel with a menu icon, web browser icon, file manager icon, terminal icon, Mathematica icon and Wolfram icon.

On the right side of the panel there are icons for connecting to the internet, adjusting audio settings and a memory usage bar. There is also a customary clock.
























To connect to the internet click on the wireless network symbol as shown above and select the network you wish to connect to.

You will need to enter the security key for the wireless network.

To browse the web click the icon next to the menu icon on the panel.

The web browser is fairly basic but it will let you view most web pages. You can install more powerful web browsers but they use more memory.
























Before doing anything else you should enter the Raspberry PI Configuration settings. To do so click the menu, navigate to preferences and then click on Raspberry PI Configuration.
























There are four tabs of Raspberry PI configuration settings:

  • System
  • Interfaces
  • Performance
  • Localisation
The very first setting is important as it allows you to use the whole of your SD card with Raspbian. Click the "Expand Filesystem" button and reboot your system.

Also within the system settings you can change the password for the PI user to something that suits you. You can also give your Raspberry PI a new name to make it more recognisable when connecting from another machine.

The other setting you may find useful on the settings tab is whether to show the GUI desktop at startup or go straight to the console.

If you accidentally find yourself going to the terminal when you boot run the command startx to show the desktop.
























The interfaces tab lets you enable the camera interface (if you have bought the Raspberry PI camera) and you can enable SSH.

SSH is great because it allows you to connect to the Raspberry PI from another computer. This means you don't need it connected to a television or monitor and you can place the Raspberry PI anywhere as long as you have power and a WIFI connection.

Installing Software
























To install software select the Add/Remove software option from the preferences sub menu.

You can now browse the categories to find the software you would like to install or search for a package using the search tool.

To install a package check the box next to it and click Apply.

Applications

The Raspbian operating system is minimal in nature but it does come with the LibreOffice suite and it performs reasonably well despite the limited RAM available.

Also included is Scratch which is a rudimentary system for teaching children about programming techniques. It is much better on the Raspberry PI 2 than it was on the original Raspberry PI. It was very sluggish the first time around but now it performs reasonably well.

Python is included and there are a couple of Java IDEs available for practising on more serious programming languages.

Claws is included as an email client and to be honest it isn't my favourite (by any stretch of the imagination and I would recommend installing something better).

As mentioned previously there is a web browser called Epiphany installed which is basic but functional.

There are some basic games available written in Python. This will give you some inspiration when starting to make your own.

Finally there are basic accessories such as a file manager for navigating around the file system, an image viewer, a PDF document viewer and a text editor.

What Next?

In the next few weeks I will be writing guides showing how to connect to the Raspberry PI from your Windows computer, Linux computer and Android tablets.

I will also show some of the peripheral devices such as the touchscreen and Raspberry PI camera.

There will also be reviews of the other Raspberry PI operating systems and a little bit about Python programming.


About the Author

Gary Newell started the Everyday Linux User blog in 2010 and has written reviews on dozens of different Linux based operating systems. He has also written a number of tutorials.

Get Updates

Subscribe to our e-mail newsletter to receive updates.

Share This Post

Related posts

3 comments:

  1. Excellent introduction to the Raspberry Pi. Congratulations.

    ReplyDelete
  2. You say above:

    NOOBS is the one recommended for most users but I am going to tell you to download Raspbian and there is a good reason why.

    If later on you decide to buy the 7 inch touchscreen display then NOOBS will not work and so by choosing the right operating system now and the right image you are protecting yourself in case you buy add-ons later on which will definitely work with Raspbian but which are not guaranteed to work with other setups.

    But surely Raspbian is part of NOOBS? Could you explain why the 7" touch screen display will not work with NOOBS.

    ReplyDelete
    Replies
    1. I'm not sure I know the full reason but it is highlighted on the Raspberry Pi website and on the Pimoroni site who sell the device in the UK. (PI SWAG Store). I would guess that the version of Raspbian within NOOBS isn't as up to date as the latest Raspbian version on the Raspbian website.

      Delete

Feel free to comment on any of the blog posts. Please try to be constructive.

Offensive messages will be removed as will blatant adverts for misleading products and sites.

Thanks for visiting my blog

Blogger templates. Proudly Powered by Blogger.
back to top Google