Raspberry Pi: The Unofficial Tutorial
Get to know the world’s favorite $25 computer: the Raspberry Pi . You’ll find tips, tricks and more in this unofficial Raspberry Pi tutorial from MakeUseOf. Whether you’re a current Pi owner who wants to learn more, or a potential owner of this credit-card size device, this isn’t a guide you want to miss.
You’ve surely heard of the Raspberry Pi: the palm-sized computer with enough power to run servers or media centers complete with retro gaming; with the connectivity to control security systems and enthusiast projects; and with the software tools to encourage the teaching and understanding of programming.
Since its launch in 2012 the Pi has exceeded expectations, becoming a must-have piece of computer hardware for enthusiasts and tech-heads. For a small project developed to be sold to schools and colleges to teach programming principles, that’s not bad.
It’s also just the tip of the iceberg. Now in its third main iteration , the Raspberry Pi is the must-have compact computer for hobbyists and enthusiasts.
In this guide you’ll find everything you need to know about the Raspberry Pi computer, its background, purpose, system specs, the software it runs and the amazing things it is capable of.
1.1 What is the Raspberry Pi?
Under development since 2006, the Raspberry Pi is a small computer with the components mounted on a credit card sized motherboard, running Raspbian, a dedicated version of the Linux operating system.
Capable of offering basic office computing, low-level gaming, internet and email access, media playback and many other features regularly expected from a computer in the 21st century, the Pi achieves all of this with a stripped-down component count, an ARM processor and a very low price.
Costs are kept so low by selling the computer without cables, storage or a case. Cables and storage are of course vital, and if you decide that you need a case, there are various solutions available (see 3.1: Case Options).
1.1.1 Other Tiny Computers
You may be aware that the Pi is not the only small computer project. Over the past few years a number of stripped down, low-cost computers have been released for enthusiasts, in some ways echoing the golden homebrew days of the 1970s and 1980s.
Other small computers include:
- The Arduino: geared towards providing a computer interface to electronics projects. Arduino is more of a control device, however, and can be used in conjunction with the Pi to manage projects with moving components. See What Is Arduino .
- ODROID: a slightly bulkier computer with the same processor as a Samsung Galaxy S3 smartphone. This runs Android, Arch Linux, and Ubuntu operating systems.
- Pine A64: not yet available, this 64-bit ARM device runs Android and is a little larger than the Raspberry Pi.
Availability for these projects differs from the Pi, which thanks to its low cost (and despite specs lower than ODROID and Gooseberry) has proven extremely popular. This is no doubt in part to the successful management of the supply and delivery chain, as well as the philosophy behind the device.
1.2 Ethos of the Raspberry Pi
The Raspberry Pi wasn’t developed for you to enjoy retro games, create a MAME system or build a media center : a far more noble cause is at its heart.
Designing and building a low-cost computer that is so flexible was the idea of a group of computer programmers such as Eben Upton and David Braben, both of whom are members of the Raspberry Pi Foundation. Their ethos for the creation of this computer was to develop hardware that children and students could use to learn about programming. The low cost of the computers means that they can be sold to schools around the world, thereby offering educational opportunities for all.
1.3 Some Uses for the Raspberry Pi
Enthusiasts around the world use the Pi for far more than its original purpose. Media center software exists as a version of Kodi, and there are several Linux distributions that can be installed.
Retro gaming is possible (modern titles since around 2000 require far greater hardware resources) as is multimedia playback; remarkably the Pi is capable of HD video. You might also use the device as a web server, print server, stop motion camera, time-lapse camera, digital photo display server, NAS controller, home security computer… the possibilities are endless!
Later in this guide we’ll be taking a look at operating systems and media center software. Meanwhile, Section 8: Fascinating Uses for the Pi provides an overview of many other uses for the computer.
You would be right to expect the specs of the Raspberry Pi to be low, but the device isn’t so stripped back that it’s useless. Rather, it combines quad-core processing and a sizable cache with intelligent engineering to deliver a pleasing computing experience.
Some aspects of the Pi are left to you to deal with. It typically ships without a case, storage, or cables, although bundles can be bought with these included. If you opt for the board alone, you’ll be surprised to find how much is available in terms of peripherals and storage. This is largely due to the hardware options that the device supports.
2.1 Raspberry Pi System Specs
There are four versions of the Raspberry Pi: Model A, Model B, Compute Module, and Zero. We’ll be ignoring the Compute Module in this guide; this ships direct to equipment manufacturers, typically for smart home projects.
Between the Raspberry Pi Model A, Model B, and Zero, you’ll find slight, but important, differences.
- Raspberry Pi Model A+: the latest version is $20, with a Broadcom BCM2835 SoC, 700 MHz single core CPU, 512 MB of RAM and a single USB.
- Raspberry Pi Model B: which comes in two current flavors:
- Raspberry Pi 2: this is $35 with a BCM2837 SoC, 900 MHz 64-bit quad-core CPU, 1 GB RAM shared with the GPU and four USB ports.
- Raspberry Pi 3: for $35, this is also equipped with a BCM2837 SoC, this time with a 1.2 GHz 64-bit quad core CPU, and 1 GB of shared RAM. Again, there are four USB ports.
- Raspberry Pi Zero:
- Available for just $5 (a $10 wireless version is also available) this 32-bit slimline Raspberry Pi features the BCM2835 SoC, with 1 GHz CPU and 512 MB RAM, shared with the GPU.
- See our dedicated Raspberry Pi Zero guide for more information.
Several aspects of the Pi’s hardware (the Pi Zero notwithstanding) has remained standard. It has a micro-USB power connector, with a HDMI port. An Ethernet port is connected to the USB bus, and a microSD port. Then there’s the dual-purpose 3.5 mm mini jack, for audio and video if your output device doesn’t have HDMI.
You’ll also find ribbon ports for displays and the Raspberry Pi camera module.
2.1.1 How Big is the Raspberry Pi?
In addition, each model is a slightly different size. The latest Model A and Model B (the Pi 2 and Pi 3) boards are 85.60 mm × 56.5 mm (3.370 in × 2.224 in), whereas the Pi Zero is 65 mm × 30 mm (2.56 in × 1.18 in). The depth of the board varies too; the Zero is just 5 mm deep, whereas the Model B boards are 17 mm deep due to the additional hardware connectors.
One of the greatest things about the Pi is that the developers have never rested on their laurels. Revisions are regularly rolled out, both hardware and software. For instance, the Model A and Model B were originally launched with 256 MB of RAM. This was upgraded in 2014 to 512 MB. However, the Raspberry Pi 2 and 3 ship with 1 GB of RAM.
2.1.2 GPIO Pins
An array of GPIO pins is provided with the Raspberry Pi. These can be used for a wide variety of tasks, from controlling the Pi (perhaps a game controller, or other input device) to controlling or accepting power from a secondary device.
GPIO pins differ on each model (and some revisions) of the Pi, so take care to check that you’re using them correctly.
Although detailed use of the GPIO pins is beyond the scope of this guide, safety isn’t. You will need to adopt the same careful approach to connecting to these pins as you would on any computer or circuit board. Without proper care, you risk blowing up your Raspberry Pi’s CPU if the GPIO pins are used incorrectly. Make sure you test the voltage through the cable before connecting to your Pi!
2.2 Development of the Raspberry Pi
A prototype of the computer that would become the Raspberry Pi dates back to 2006. The Raspberry Pi Foundation was formed in 2008, but it wasn’t until 2011 that the possibility of the computer being released as a viable project became apparent.
While the original 10,000 boards were built in Taiwan and China, the Pi is now built in the United Kingdom, in South Wales. Following its launch on February 29th 2012, 500,000 boards had been sold by September 2012. According to the Raspberry Pi Foundation, by November 2016 an amazing 11 million Raspberry Pis have been sold!
As we’ve seen, the Pi ships as-is. When you open the box, all you will find is a small motherboard with the required components attached. It’s up to you to finish the job with cables, a case and storage media.
Cases for this device come in all shapes and sizes, from Lego to downloadable cardboard cutouts. In addition to a case, you’ll need certain cables to enjoy your Raspberry Pi, as well as storage, typically an SD card. Let’s explore your options.
3.1 Case Options
The first thing you will notice about a brand new Pi is that it ships without a case. This is a little similar to running a PC motherboard without bothering with the tower – unwise! The solution, of course, is to find or build a case — what’s available?
3.1.1 Punnet Case
The Punnet case is a popular option, being as it is completely free and easy to construct. It exists as a printable design that can be cut out and constructed in thin plastic, thick paper, or card, providing a home for your Pi computer.
Several versions of the punnet case are available.
- The original punnet, suitable for the Raspberry Pi Model B
- A modification for Raspberry Pi Model B+ boards [Broken URL Removed]
- A revised version for the Raspberry Pi 3
There is little that you can’t build with Lego, and a case for the Pi is not an exception. As with any DIY case for this computer, you will need to make sure that there is sufficient space for the cables and memory card, and that the case offers sufficient ventilation. You can use the Punnet case design to help with the positioning of these gaps.
3.1.3 Hobby Cases
Various cases are available for the Pi. The only complication comes when choosing the right case for your device. The best places to find a case are eBay, Amazon, as well as:
Incidentally, if you’re a fan of Lego, some cases are designed to be Lego-compatible!
It’s also possible to build your own case from various materials. This eLinux page lists many variations. Later revisions of the various Pi models are equipped with a couple of mounting holes, which you can use to mount the Pi. You can find their position via this template from Pi Spy.
3.1.4 Upcycle Old Hardware
Handheld game consoles like the Nintendo Gameboy, old routers, keyboards and even video game cartridges (specifically those for the Nintendo 64) can all be used as housings for the Raspberry Pi. A certain amount of planning will be required, and you will need to have the right equipment to hand to make the conversion possible. Old toys and music players can also be repurposed to hold a Pi .
There are many more ways in which you can put your Pi in a case – this is just the tip of a very sweet and pastry-capped iceberg!
Whichever case solution you use, make sure that it is sturdy, will protect the Raspberry Pi from knocks, and offer the necessary airflow for keeping the processor cool.
To get the best from your Raspberry Pi, you’ll need several cables:
- Ethernet: if you don’t plan on using Wi-Fi (perhaps your Pi doesn’t have built-in wireless, and you don’t yet have a USB Wi-Fi dongle), you will need this to connect to your router.
- HDMI cable: remarkably, the Pi has a single HDMI port, for high definition video and audio. Even more remarkable is the Mini-HDMI on the Raspberry Pi Zero. A standard HDMI adaptor is included, but if you have a Mini-HDMI cable, this will fit perfectly.
- Audio cable: the Pi includes a special dual-purpose 3.5 mm mini jack. Its first purpose is for audio, ideal for connecting your pocket-sized computer to speakers. This is useful if you’re not using HDMI, or want to send your audio to a different device.
- RCA Video cable: the second purpose of the mini jack is as an alternative video out (at a low resolution) for use with displays without HDMI.
- Micro-USB cable: while you should use a power adaptor in most cases (see below) a cable capable of carrying 5V will prove useful if you need to power the Pi from your PC. You can also employ a portable smartphone charger as your power source.
Recommended reading: What Are The Different Computer Cable Types You Should Know
Cables aren’t everything, however…
One of the most important elements of any computer is the storage, from which the operating system is run and data stored. The Pi doesn’t have a hard disk drive — instead, it is equipped with a microSD card slot.
You should aim to purchase a high rated SDHC card for use with this mini-computer. Capacity should be 8 GB or more – more storage offers the best results. The Pi uses the storage much like a solid-state drive, which is why the SDHC format is used for its improved read/write resilience.
Additional storage can be attached via the USB ports. It’s also possible to forego the microSD card and boot from a USB device, but you’ll still require the microSD card to set this up.
One option is to purchase a PiDrive, a hard disk produced by Western Digital. This ships with a custom version of NOOBS (see below), enabling you to install multiple Pi operating systems onto a 375 GB or 1 TB HDD. The advantage to this is that you don’t have to install a new OS each time you need to start a new project.
3.4 Everything Else
There are a few other things that you will need for the Pi to work.
- USB keyboard and mouse: pretty vital if you plan on entering any text or using the configuration menus. After the device has been connected and configure, you can use the USB ports for other purposes (such as additional storage or wireless networking), instead of entering text commands via SSH.
- 5 volt via Micro-USB power adaptor.
3.5 Handle with Care
Whatever you’re planning to do with your Raspberry Pi, make sure you give it the respect it deserves. It may be small, but it is just as prone to damage from static electricity and knocks and blows – not to mention extremes of temperature – as any other computer.
As such, you should remove all jewelry and static-attracting garments (nylon and other man-made fibers, as well as wool), handle the device in a clean, dust-free area with a solid, non-carpeted floor and make sure that you have clean hands and have earthed yourself.
Once your Raspberry Pi is suitably protected in its box or case, you can then continue to use it much as you would any other device. However, starting up and shutting down can prove problematic (particularly the latter) – see section 5.1: Start and Shut Down Safely for more details.
With the correct cables and storage prepared you’ll be able to install an operating system on your Pi. Due to the hardware profile, however, this isn’t a device that will run Windows or Mac OS X. Instead, you will need to rely on a Linux distribution.
There are several distros available for the Pi, but the most popular is Raspbian , a cleverly named Debian port configured specifically for the Pi. Installing this can be tricky if you don’t follow the instructions, and like any OS installation on the Raspberry Pi it requires additional software to make your SD card bootable.
Other distros can be downloaded and installed on the Pi, but the most interesting of these is Android. Let’s not get ahead of ourselves, though: keep reading to find out how to install Raspbian.
The following steps are for setting up the software on Windows. Linux users can write to the SD card with the dd tool, while Mac OS X users can also use dd or RPi-sd card builder utility. Full instructions for these platforms are available online.
Our guide to getting started with the Raspberry Pi for Mac users should help here.
4.1 Installing Raspbian
To get started installing Raspbian, visit Raspberry Pi Downloads and download the latest version. You will also need Win32 Disk Imager. With both downloaded, unzip Win32 Disk Imager and insert your card into the card reader.
Run the utility and select the correct drive letter (check in Windows Explorer) and click the file icon to browse to the directory where you have downloaded your latest Raspbian build.
To start installation, click Write and wait. When the process is complete you will be notified.
Your Pi is ready to go!
4.1.1 Using Raspi-config
With Raspbian installed on the microSD card, you’re all ready to go. Safely remove it from your PC, insert it into the Pi and power up the computer, with your HDMI cable and keyboard connected.
When you boot the Pi for the first time, you’ll be taken to the Raspbian Wheezy PIXEL desktop environment. From here, open the Menu, go to Preferences, and open Raspberry Pi Configuration.
A command line version of the configuration tool is also available. Raspi-config can be launched at any time from the command line with:
Use your keyboard arrow keys to navigate the menu and make the necessary changes.
Whichever configuration tool you choose, you should check for updates before proceeding. Use the Update option in your configuration menu to do this, and follow the instructions. Once this is done, you should also expand the root partition.
4.1.2 Controlling the Pi with SSH
Headless use of your Raspberry Pi — using it without a dedicated monitor — is achievable using SSH.
You can enable this in the desktop configuration tool, or raspi-config in the command line. As long as your Pi is connected to the same network as your computer and you have an SSH utility such as PuTTY (available from www.chiark.greenend.org.uk/~sgtatham/putty/download.html) running, you should be able to connect via SSH in seconds.
Configuring PuTTY is straightforward: in the Session screen, add the IP address of the Raspberry Pi in the Host Name (or IP address) field. Ensure SSH is selected and click Open. You can login to your Pi using the credentials provided by your chosen distro (for instance if you use Raspbian, the username and password are displayed on the Raspbian download page).
You’ll find the IP address in two ways:
- Use the ifconfig command in the command line
- Check the devices connected to your router; your Raspberry Pi will typically appear by name.
4.1.3 Enabling SSH
Don’t have a monitor for your Raspberry Pi? The answer is to connect via SSH — but how can you do this without having a monitor connected to enable SSH?
Fortunately, there is a workaround. Before inserting the microSD card into your Pi, open the Boot directory in your desktop operating system’s file manager. Here, create a text file called SSH, being careful not to give the file an extension.
For example, if the file was called ssh.txt, rename the file so that it is simply named ssh. After closing the file manager and safely removing the microSD card, insert it into, and restart, the Pi. With this SSH file present, you’ve activated the provision for secure connections over your network, and can connect to the Pi with the default username and password.
Make sure that you change the password! Do this with the passwd command after logging in.
4.1.4 Share Data via an FTP Program
Moving data to and from your Raspberry Pi can be a bit tricky without SSH enabled. Fortunately, you can get around this using FTP software. Several are available, but you need one that supports SFTP (I use FileZilla). This is essentially SSH over FTP, and offers a secure route for sharing data with your Pi.
For instance, if you wanted to copy software to your Raspberry Pi from your PC, you could easily do this via SFTP. Or you might want to copy photos created with the Raspberry Pi camera module back to your PC.
All you need to do to use SFTP is input the IP address of your Raspberry Pi, login with the username and password, and then drag the files in question between the two panes of your FTP application.
4.1.5 Advanced Configuration with PiBakery
If you want to go a step further and fully configure your Raspberry Pi before booting, you need the PiBakery. This is a very useful utility that has a copy of Raspbian Jessie built into it. Put simply, you configure the operating system, then write it to the microSD card.
For instance, you might configure a wireless network connection, or enable SSH. You can instruct it to install software on its first boot, or run a VNC server. Once the preferences are set, you bake them into Raspbian, writing a specific disk image to the microSD card.
Our full guide to PiBakery will give you all the details.
4.2 Other Distros
Raspbian is the most popular choice for Raspberry Pi owners, but is by no means the only distro available for the computer.
Other options include:
- Arch: this is an ARM variant of the main Arch Linux, and boots in around 10 seconds. Versatile, but with a steep learning curve for Linux beginners.
- Ubuntu: the most well-known Linux operating system, several versions of Ubuntu are available . We recommend the Ubuntu MATE variant.
- RISC OS: available free of charge to Pi users (RISC usually requires a license) this is the modern version of the British operating system, which like the Pi was developed in Cambridge.
- OSMC: this is the main Raspberry Pi version of Kodi, the media center software. With this, you’re setting your Pi up as a dedicated media device.
- Moebius: a stripped-down operating system designed for projects requiring none of the bloat found on a standard OS.
- Android: several versions of Android have been released for the Raspberry Pi, using the code from the AOSP (Android Open Source Project) repository. To date, there hasn’t been a version that successfully matches the flexibility of the hardware with the software, but you may have some fun trying it out.
Also available is NOOBS (New Out of the Box Software), a tool that can be copied directly to a freshly formatted microSD card, and used to install your preferred operating system. You’ll find NOOBS available for download at www.raspberrypi.org/downloads. There are two versions, a lite download that will pull the operating system you want onto the microSD card, and a full download for offline installation.
4.2.1 Operating Systems in NOOBS
Packaged with NOOBS are:
- LibreELEC (an alternative to OSMC)
- Pidora (a version of Fedora)
- RISC OS
- Recalbox (a retro gaming OS)
- …and others in a regularly changing lineup.
Whether you’re unsure about the main method of installing Raspbian or just want some extra flexibility, it is recommended that you have a copy of NOOBS to hand.
There are two ways to use the Pi. The first is to rely on the text-driven user interface, which is ideal for particular tasks. Alternatively, there is the second option, using the mouse-driven GUI, which will be far more familiar to most users.
As you should be aware if you’ve read the guide to this point, the Pi’s Raspbian operating system is based on the Debian distribution of Linux. However, the desktop, PIXEL, is based on the LXDE environment.
If you’re already familiar with Linux, this will help. But if not, the basics are extremely easy to get to grips with.
5.1 Start and Shut Down Safely
You might have noticed that the Raspberry Pi does not have an on or off switch. So how can you power it down? The easy option is to click the Shutdown option from the main menu on the desktop.
Thanks to the SD card that is used as a storage device in the Pi, switching the computer off by disconnecting the power cable or unplugging at the mains will more than likely corrupt the OS, preventing you from being able to reboot. In this situation, a reinstallation will be required.
To avoid this, you should use the provided shut down menu option. There is also a command line option:
This has various switches and conditions. For instance, the above instruction will shut the Pi down in one minute. But adding -h now to the end of the line will force an immediate shutdown.
Incidentally, if you’re ever in the command line environment having logged out of the desktop, you can return to the GUI (Graphical User Interface) by relaunching X:
For a more intuitive shutdown, it’s possible to add a reset switch to your Raspberry Pi .
5.2 Issuing Instructions in the Command Line
Although running the Raspberry Pi with the GUI desktop rather than the text-based command line is probably preferable in many situations, as with any Linux distro there will be times when you need to use the command line option to issue instructions.
If you’ve booted into the GUI and want to quickly access the command line, use the shortcut at the top of the screen, or hold CTRL > ALT > T. This will launch the terminal emulator, Terminal.
To get the most out of a Pi running a Linux distro such as Debian, you will need to become more familiar with the principles of the operating system. Our Newbie’s Getting Started Guide to Linux is a great place to start as well as this list of useful commands every Raspberry Pi user should know .
5.3 Adding New Software
There are two main methods for installing software onto your Pi. The first is the traditional Linux route of downloading and installing from a remote server, known as a repository. This is done from the command line:
apt-get update apt-get install [softwarename]
If you prefer a more interactive software installing experience, a package manager is also included. You’ll find Add/Remove Software via Menu > Preferences. This is a modified version of the GNOME Packages tool, and features a search function.
Occasionally, it doesn’t appear in Raspbian. You can manually add GNOME Packages via the Terminal command line with:
sudo apt-get install pi-package
Once you’ve found the software you want in Add/Remove Software, check the box, click Apply, then OK, and the application will download and install. Games, desktop environments, fonts, browsers, media tools and more can be installed this way.
One of the key reasons for the development of the Pi was to create an affordable computer that children and students could use as a platform for application development. Programming on the Pi is made simple by the provision of various tools, available bundled in with the Raspbian operating system.
Whether you’re happy learning to program applications with Python or you prefer one of the alternatives that can be installed, you’ll need a plan or outline for your application, plenty of time to spend getting it right and some basic background in coding.
The primary programming language provided with the Pi is Python. If you have experience with this language then you should be able to start coding straightaway.
Of course, if you’re 7, the chances are that you haven’t had the time to get to grips with Python, what with collecting worms and buying sweets. Fortunately, the Raspberry Pi ships with a useful Python module called Pygame, essentially a game construction kit that should enable you to have fun and learn basic game building principles at the same time. There are also several programs included that have been written in Python, so you can get an idea of what can be achieved.
Note that Python is a cross-platform scripting language, which means that you can program on a Windows computer or a Mac, save the project and then run it on your Pi.
6.2 Other Programming Tools
Although Python is considered the core programming tool for young users of the Pi, other languages can also be used:
- Java is one option, and is pre-installed on current versions of the Raspberry Pi’s Raspbian Jessie operating system
- PHP can also be successfully used, opening up some interesting possibilities for using this mini-computer as a web server.
- Scratch 2.0 is included in the Raspbian distro, an easy to use development tool aimed at children with a drag-and-drop GUI that makes building conditions and in-game situations extremely simple. Scratch is developed by MIT Media Lab and Lifelong Kindergarten Group, and Flash support is provided by the Pepper Flash plugin for Chromium.
- Projects using the GalaxC, Lazarus and Groovy languages can all be compiled and tested on a Pi.
- Arduino IDE is also available for the Raspberry Pi, allowing you to connect an Arduino and create a sketch (a program in Arduino, written in C++). Connecting these two devices together presents many options for home automation .
6.3 Where to Find Tips on Coding
Python is a widely used programming language, and you can find plenty of tips for use across the web. Check out our article on 5 best websites to learn Python , as well as our list of top Raspberry Pi programming resources .
The tutorial is quite comprehensive, so you will need to put plenty of time aside for going through it. Reference guides are also provided explaining the various libraries and the functions in each, enabling you to get a grasp of what can be done with this language.
Head to docs.python.org/3/ to begin your Python tutorial.
While Scratch might appear to be quite self-explanatory, you can get support and see other projects by visiting scratch.mit.edu.
6.4 Raspberry Pi in Schools
As you learned earlier, the Pi was conceived as a computer that pupils and older students could use for programming in schools. But how successful has this aim been?
Unfortunately there are no explicit figures, although there are accounts of schools making bulk purchases and people buying the devices to donate to education facilities. It is estimated that around 20% are in the hands of children, and there are likely to be many more young people who have a Pi in the family.
What we do know, however, is that Google has donated at least 15000 Pis to schools around the UK.
Initially, it seemed that some schools may be ill-prepared to deal with teaching on the Pi. Fortunately there is a useful Creative Commons licensed manual produced for UK educators, CAS Raspberry Pi Educational Manual, which can be downloaded via the Raspberry Pi website and through the integrated app store. There’s also a teacher’s guide to the Raspberry Pi available on the official website.
Arguably the most popular use for a Pi is as a media center. Why splash out $$$ on a smart TV when you can get everything you need for under $40?
Thanks to the USB ports and networking, a Pi makes an excellent media device, both as a small set-top box streaming media from a larger PC or the web and as an all-in-one unit, accessing external hard disk drives and other storage media and outputting the media to your TV or sound system.
In order to do this, however, you will need to install a special version of Kodi, configured to run on the Raspberry Pi. Several full disk images are available:
Like Raspbian, these can be written to your Pi’s microSD card.
In addition, retro gaming distros Recalbox and RetroPie can also run Kodi, and come with it either preinstalled (Recalbox) or as an option to install (RetroPie). If you choose to install the full disk image, it’s a good idea to have a spare SD card, one for your Raspberry Pi’s usual operating system and a second for Kodi. This way you can swap between roles as easily as switching the cards over, making the little computer even more flexible.
7.1 Installing Kodi on the Raspberry Pi
If you prefer to simply run Kodi on the Raspbian operating system, you can install it as you would any other application. Up-to-date versions of Kodi are maintained in the Raspbian repositories, so all you need to do is run a simple update-and-install command:
sudo apt-get update sudo apt-get install kodi
Once installed, you’ll be able to run Kodi from the Raspbian Jessie desktop. It’s also be possible to configure Kodi to launch automatically at boot.
7.2 Principles of Running Kodi on a Raspberry Pi
Although setting up Kodi on the Pi is relatively easy, and getting started for viewing videos and enjoying music is simple, using the Pi as a media center is a little different to the usual setup.
Unless you’re using an extremely large capacity microSD card (SDHC with a maximum of 32 GB is the recommended format, although some types of SDXC are believed to work) you will need to run media from an external hard disk drive, a USB storage device or an external optical drive. Kodi offers various streaming options thanks to its wide selection of add-ons, of course… it all really depends on your preferred media choices. You should also consider a powered USB hub if you’re planning on maxing out your existing expansion options.
A network attached storage (NAS) box might be one solution for media stored on HDD, for instance, or you might rely on sharing content across your home network from a PC in your office, bedroom or den. Funnily enough, you could use a Pi to manage a home-built NAS.
Installing Kodi is only the first step in setting up your Pi media center. A variety of add-ons enable you to extend this software considerably, many of which we’ve covered at MakeUseOf.
While running a Raspberry Pi as a media centre seems to be an extremely popular option, it isn’t the only way in which this versatile little computer can be put to work.
There are dozens of ways in which the Pi can be used to achieve various purposes and to complete many different tasks, from using it as a NAS to running a web server or even a carputer.
Over the years we’ve shared with you many ways in which you can use the Raspberry Pi. We’ve collected the most fascinating and achievable in this section of the guide for you to consider, and to appreciate the magnificence of this tiny home computer.
Note that these projects may involve additional equipment and expense.
8.1 Raspberry Pi + Kindle = Portable Computer!
One of the most remarkable hacks for a Pi is to couple it up to a Kindle e-reader, using the latter as an e-ink display for the former.
The connection is via a USB to microUSB cable, and requires that you jailbreak the Kindle, install a terminal emulator and a tool called UsbNetwork. Once the Kindle has been unlocked and the necessary utilities installed, you will be on the way to using the e-reader as a display for your Pi. Note that this can only be done with the Kindle models that are equipped with an integrated keyboard. Full steps for building a KindleBerry Pi — which requires a Kindle 3 — can be found at www.ponnuki.net/2012/09/kindleberry-pi/.
8.2 Turn Your Raspberry Pi into a NAS Box
We’ve already seen how the Pi can be configured as a media centre. One great way to serve media files to your Raspbmc device is with a NAS box – another easy to setup project (assuming you have a second Raspberry Pi).
Although not suitable for streaming HD videos (due to the use of the Samba server software), a Pi NAS box can be set up as a low-power NAS (see, what NAS is).
In order to complete this project you will need:
- Raspberry Pi (Model B)
- An SD card configured with the bootable OS
- A USB connected hard disk drive
- Ethernet cable for connection to your home network
You will also need to configure the Samba server on your Pi (running one of the Debian distros) and the Samba client on your Windows, Linux, Mac or Android device.
Full details on using your Pi as a NAS box can be found at elinux.org/R-Pi_NAS.
8.3 Kit(t) Your Car with a Raspberry Pi Carputer
End your TV nostalgia dreams of being David Hasselhoff driving a black Trans-am in Knight Rider — with a Raspberry Pi you can set up your own carputer (although it may not be too hot on conversation).
Building a Pi carputer is a bit of a tricky one, although it has been achieved by several users. The key component is a touchscreen display, enabling you to interact with the chosen software but you’ll also need to deal with powering both devices, mounting the display and potentially incorporating a 3G widget for media streaming.
“Pursuit mode” not included, sadly.
8.4 Gaming Machine
Enthusiasts of the arcade gaming emulation platform MAME have ported the software to run on a Pi, enabling games designed for cabinet machines to be played.
For the full experience, of course, you should be aiming to construct a cabinet to accompany your Pi, monitor, mirror and controller, although you might well skip on the coin-operated aspect of the games machine!
The best approach to building a MAME machine is to run the Pi with a slim operating system. This is where Moebius, mentioned in 4.2: Other Distros, comes in handy. For full details, check this mammoth guide to setting up your Pi as a MAME.
You also may be surprised to learn that the Raspberry Pi makes a remarkably compact and reasonably capable gaming system.
While you won’t be playing Call of Duty: Modern Warfare or The Sims 3 on it, you will nevertheless have the power to run a range of retro titles up to around the year 2000, thanks to emulators for many different consoles and computers since the 1970s.
You shouldn’t be surprised to learn that there are several games that have been ported from other platforms in order to run on Pi. It’s not too difficult to get Doom running, for starters!
8.5 internet Radio
Rather than using your Raspberry Pi as an all-in-one media centre, you might prefer to limit its abilities to playing back music, streamed from the internet.
There are different approaches to this as a Pi internet radio can be setup without a GUI. In most cases this is preferable (for obvious reasons of space), and the software used can be accessed via SSH.
8.6 Security System
Do you want to know what is going on in a particular room of your house or outside your property? If so, you can use your Pi as a security system, using webcams to observe and a network connection to view from another computer or even from an entirely different location.
There are several varying descriptions on how to achieve this available on the web, but the most important aspects are to use webcams that have Linux drivers and to use either powered USB cables or a powered USB hub in order to run the cameras. This project is heavy on USB, and as the Ethernet port on the Raspberry Pi is also part of the onboard USB, you can see where there might be some drain on available power.
8.7 Babycam Server
Working to a similar principle (but with added microphones) you can also use your Pi to manage a babycam server, enabling you to observe and listen to activity coming from your little ones.
Depending on which approach you use, however, this can be a tough nut to crack, due to the problems with compression, the results of night photography and the delay (up to 10 seconds for the image to be captured, compressed and routed to your viewing device).
8.8 Home Automation Server
If you’ve ever seen a sci-fi film in which the heating, lighting, security and entertainment in a home are all controlled from the same remote device and thought “I want some of that!” then this is the Raspberry Pi project for you.
It is also – if you’re coming to the concept fresh – by far the most expensive, as it involves introducing new hardware around your home, enabling you to interact fully through a remote (typically a smartphone) via your Pi.
Some good further reading for this project:
8.9 Testing or Live Web Server
Hosting a website can prove expensive, particularly if all you need to share with the web is a single “about” page that perhaps links to other online locations. Paying several dollars a month for this is bad economics, so you might consider taking advantage of your Raspberry Pi to host your online presence.
Thanks to LAMP and SSH this is made possible, even enabling you to run a database-driven website!
PenguinTutor explains how you can setup your Pi as your own web server, for personal use or for sharing with the web. Note that for the latter you will require a static IP address.
8.10 Wireless Access Point
You can use your Raspberry Pi as a Wireless Access Point, extending the range of your router. This can have a range of benefits, all of which can be implemented using Pi-Point. You’ll find full details, documentation and a custom Raspbian image at www.pi-point.co.uk.
With your Pi setup as a Wireless Access Point, the device can be used both as a wireless extender and as a secondary router for offering free wireless access to the surrounding area. This in turn will help you to learn more about wireless networking and security.
8.11 A Print Server
Old printers typically will not connect to a home network without a print server. But even if you can find a compatible device, these can be unnecessarily expensive. Fortunately, by connecting a Raspberry Pi to your printer via USB, you can bring the device online.
This is made possible thanks to the Samba server software and CUPS (Common Unix Printing System), which can both be installed and configured on the Pi. As long as the Pi can detect the printer over USB, and the computer has a network connection, other devices on your network can print without a wired connection to the printer . Better still, this isn’t limited to desktop devices — it’s also possible to print using the AirPrint mobile printing solution for iOS.
8.12 Raspberry Pi Picture Frame
Pair your Raspberry Pi with a disused monitor, or even a dedicated Pi-compatible display, and you can easily configure a digital picture frame. We tried this, resulting in an inspiring picture frame that displays stunning art and thought-provoking quotes .
Don’t be limited by that concept, however. You’ll find many ideas for a Raspberry Pi picture frame from weather information to home dashboard. You could even add motion-sensors, in order to only display new images when someone is nearby.
8.13 Build a Streaming Speaker
Many Raspberry Pi projects require some basic electronics, and this is a good one to get started with. The idea is simple: install the Pi into a combi amp, share its power supply, and copy your music library into the device.
Want to listen to music? Control it from your phone! Our tutorial will give you some additional detail to the video above.
8.14 Play Your Own Theme Tune When You Enter the Room
Have an inflated opinion of yourself? Want to announce your entry every time you get home? Perhaps a round of applause when you enter, just like an studio sitcom?
With some resistors, a reed switch and a speaker, you can hook your Pi up to detect whether a door has been used, and play an audio alert as a response . This might be a theme tune, or a sound effect, such as applause, or even an alarm.
8.15 Build a Robot Dog
There’s something quintessentially British about the Raspberry Pi, so why not extend this quality further, with a trip into space and time? Back in the 1970s, British sci-fi series Doctor Who had a sentient robot dog called K9, and so too can you, all thanks to your Raspberry Pi.
Now, we won’t pretend that this will be easy. Detailed steps aren’t available, but as inspiring projects with the Raspberry Pi go, this is the daddy.
So you’ve got your cables, your SD card, your distro of choice and you’ve been using your Raspberry Pi as a mini computer, perhaps housed in a small case.
There’s more that you can do, however. The Pi is graced with a very useful pair of pin-based connectors, allowing for the addition of further functions and components. Thanks to breakout boards you can turn your Pi into a programmable Arduino-esque device, completely spinning the concept of this little computer on its head.
Beyond breakout boards you will find even more fascinating tools and components that can be added to a Pi.
9.1 Breakout Boards and HATs
You can take your Pi to the next level by taking advantage of a breakout board. Using the GPIO, I2C and SPI pins, these boards come in pre-assembled or kit form, enabling you to extend the functionality of your device. The idea is that you are able to build upon the hardware of the Raspberry Pi by adding more integrated components.
These boards can be used to power other equipment, such as lights, radios or even model train sets.
Breakout boards can be purchased online from sellers such as:
You’ll also find sellers on Amazon and eBay offering expansions to the Pi.
As you’ve probably guessed, some understanding of electronics is required before you connect a breakout board.
Meanwhile, if you need to add extra functionality to your Pi on a semi-permanent basis — such as a sound card — this can be done using a HAT. HAT (Hardware Attached on Top) boards can be mounted using the Pi’s mounting points, and feature a GPIO connector that allows full pass-through. They’re available from the usual stockists.
9.2 Other Non-Essential Components
You’ll find through regular use of your Pi that many other cables and components can be used. These are in addition to those outlined in Section 3.
- Cables: in addition to the cabling discussed earlier, you may want to take advantage of the Pi’s audio out port and connect the computer to your surround sound system. Alternatively, you might like to output video to a device other than a HDMI monitor — something you can only do with an RCA cable.
- Cooling components: planning on a lot of HD decoding on your Raspberry Pi? If you’re watching HD video, you will need to consider some form of cooling. While a decent case will provide vent slots above the main CPU, you might also consider a heat sink. There are several available, from the small, traditional radiators found in desktop PCs to the more unique, “wavy metal” variety.
- Wi-Fi: the Pi supports a large number of USB wireless dongles. The Pi hardware suppliers mentioned in this guide will help. Most are easy to set up. If you have a Raspberry Pi 3 or Pi Zero W, wireless networking and Bluetooth are built in.
- A hook-and-loop fastener strip such as Velcro: if you’re planning to deploy your Raspberry Pi as a media centre, NAS box or simply as a computer for development (as intended!) you might consider some means of attaching it to your table, back of your TV or atop your hard disk drives. Unlike a desktop computer whose weight dominates over movement from the cables, a Pi will often be pushed about, particularly by an Ethernet cable. Using a strip of something like Velcro will put an end to this, fixing the computer in place and avoiding potentially nasty knocks.
9.2.1 Official Hardware
In addition to those extras, you might consider some additional hardware to extend your Raspberry Pi’s functionality.
- Camera module: two official camera modules have been released for the Pi. First is a standard HD camera, while the other is an identical camera without the IR filter. These can be used for a number of projects, from standard photography to time-lapse and stop-motion.
- Compact display: several displays are available for the Raspberry Pi, such as the PiTFT monitor, a small, Pi-sized touchscreen display. Prefer something a bit more usable? The 7-inch Raspberry Pi Touchscreen Display is also available, and is straightforward to set up .
Whatever you’re planning with your Raspberry Pi, it should now be clear how versatile this box of tricks really is.
Installation is a cinch, software is easy to install, and the entire setup will cost you under $50. Indeed, it is easy to see why this little box of wonders has shipped over 11 million units!
Ten Tips for Successful Use of Your Raspberry Pi
You now know everything you need to get started with your Raspberry Pi. To refresh your memory, here are ten tips for successful use.
- Safely boot your Pi computer by ensuring that the SD card is correctly inserted before switching on.
- Expand the filesystem to give your projects the full volume of available storage on the microSD card.
- Access the Raspberry Pi via SSH from a desktop computer using software such as PuTTY.
- Make sure you have a good case for the Raspberry Pi, one that offers ventilation and protection. And choose cases based on the project you’re running.
- Various distros (including Debian and Ubuntu) are available for the Raspberry Pi. You could run several, installing them on separate SD cards to gain the most flexibility.
- Your Pi is particularly suited to running as a media center thanks to the OSMC distro.
- Originally intended as a device to teach children how to program, a good selection of coding tools are available for the Raspberry Pi.
- There are many uses for this computer, a hugely flexible piece of equipment. Don’t forget, however, that it can also run word-processing software, email clients and the Chromium web browser.
- You can extend the possibilities of the Pi by adding breakout boards, HATs, and other peripherals.
- Safely shut down your Pi by switching to the command line and typing sudo shutdown (or sudo reboot to reset). Remember to remove the power cable when the computer is shutdown.
There’s one more tip: don’t let anything limit you, except your imagination, and just enjoy it!
Recommended articles from MakeUseOf.com
- The Raspberry Pi Home Theater: What You Can And Cannot Do
- The Hardware You Will Need To Build A Raspberry Pi Media Center
- 7 Reasons To Get A Raspberry Pi
- Not Enough Juice? Squeeze Your Raspberry Pi By Overclocking
Did you learn anything useful today? What projects have you made with your Pi? Let us know in the comments below!
Image Credit: designer491 via Shutterstock.com