Getting Started With Raspberry Pi

Introduction

A Raspberry Pi is a portable (about the size of a credit card), powerful and affordable (costs ~$35) computer that has been especially popular in education and has gained massive traction since the Raspberry Pi Foundation released its initial version in 2012. In this tutorial, I will go through the basic steps of setting up the Raspberry Pi to set up an education PC. But before that, let us discuss why someone might use a Raspberry Pi.

Comparison With Other Systems

The biggest competitor to the Raspberry Pi is definitely its older sibling the Arduino. Although very similar, the two systems differ in subtle ways — the Arduino behaves more like a specialized motherboard (think refrigerator, microwave etc) while the Raspberry Pi behaves more like a computer (with a dedicated operating system and standard input/output devices). The Arduino is thus better suited to simple repetitive tasks and can only run one task at a time for the most part whereas the Raspberry Pi is more suited for complex tasks that involves fuzzy logic and can run multiple tasks at a time. This major difference means that the Arduino is better suited to interfacing with lower-level hardware components while the Raspberry Pi is better at interfacing with higher-level software components.

I experienced this difference personally when I wanted to build a lamp that glowed a different color and played different sounds based on the weather forecast — a very difficult task with the Arduino but a much easier one with the Raspberry Pi. A good rule of thumb to decide is to count the number of unique tasks the system will perform — if this is two or less the Arduino can easily handle it otherwise a Raspberry Pi would be better suited to handle the problem. Now that you know more about when to use a Raspberry Pi, let me show you how to set up one.

Setting Up the Raspberry Pi

The first step is downloading the Raspbian Linux distribution for the Raspberry Pi and burning its image onto an SD card. Since the Sparkfun kit came with this preconfigured, I did not do this step but you can find instructions for doing so here. From my previous experience I know that this is a huge beginner pitfall and setting up this system from scratch can take time which is why I strongly advise you to get a kit from Sparkfun or elsewhere in order to minimize this headache.

Next connect a HDMI display, wired keyboard, wired mouse and ethernet cable to your Raspberry Pi in that order so that the Pi can recognize devices in the right order. Here’s a schematic to help you find out what all the different inputs and outputs mean.

Raspberry Pi ports courtesy Element14

The next step is installing the Raspbian distribution but I skipped this step since the Raspberry Pi I received from Sparkfun had the Raspbian Linux distribution pre-loaded. When I did this on my own a while back this step took significant time and was slightly challenging; I ended up wiping the Raspberry Pi clean by accident. If all goes well, you should be presented with a screen like this:

My Raspberry Pi homescreen

This is Raspbian, a minimal operating system built off Debian that packs most of what you would expect from a Linux desktop computer. Go on, use your mouse and keyboard to interact with it! Use the wifi icon in the top right to connect to your wireless network and try going to the web browser Note that only works for Raspberry Pi version 3 and above, which is a common tripping point for beginners. For older versions, you may either attach a wifi dongle or plug your Raspberry Pi into an ethernet port. If you have made it this far, congratulations, you are now surfing the web without any additional configuration! You can also set up bluetooth by following this tutorial. You can also attach other input devices and I managed to set up my XBox 360 controller for use with the Raspberry Pi by following this tutorial.

Setting Up the Educational Software

One of my ideas for leveling the playing field for the ACM SIGCHI Student Design Competition was creating a portable desktop with programs to help kids with autism. Although our team didn’t end up going down that path, I feel that this is still a valid way of introducing children to educational tools.

One of the the best repositories for such tools is the Debian repositories (the same one which Ubuntu uses), especially its education section which contains gems such as Anki, a spaced repetition program that helps people (myself included) memorize flash cards more effectively. To install a program (Anki for example), all one needs to do is run

sudo apt-get install anki

Anki should now be visible in the Education menu from the top bar.

What Anki looks like on the Raspberry Pi

Some of my favorite education packages are tuxpaint(a paint program), stellarium (a solar system simulator) and gelemental(a Periodic Table program), but do explore to find your own favorites!

Next Steps

Now that you have the basics down, here are some inspirations for things you might want to do with a Raspberry Pi:

  1. Set up a server such as Apache so that the Raspberry Pi can be run in “headless” mode ie without the need for a keyboard, mouse or display. This can serve as a quick and dirty backend for a web service that can be a quick way to prototype a service without needing to pay for a server.
  2. Combine Raspberry Pi with some custom hardware components to build the cool projects seen on Lifehacker including creating your own Alexa, turning it into a retro game console and much, much more! This can serve as a good inspiration for hardware components to incorporate into projects.
  3. If you already have an Arduino, you can combine it with a Raspberry Pi and utilize both of them together for their respective strengths as shown in this article. This might be useful for higher-level data analysis eg letting Arduino handle the low-level details of interfacing with a camera and using Raspberry Pi to run facial detection on the Arduino’s output.
  4. But of course my personal favorite has to be using the Raspberry Pi to play and script Minecraft. This is the initial reason I bought my personal Raspberry Pi and if you’re anything like me this is a huge motivation to pick up and learn more about the Raspberry Pi.

To get a deeper grasp on the fundamentals of Raspberry Pi, I’d highly suggest their excellent help resources, especially the video tutorials which were a great help in bringing me up to speed. For more complicated topics I have found the forums to be an invaluable resource and have had questions answered within minutes which prevented me from getting stuck for extended periods of time.

Summary

In this tutorial I introduced you to the Raspberry Pi, showed you why you would consider it vis a vis the Arduino, how to set up the basic Raspbian operating system and how to install educational packages onto the Raspberry Pi. I hope this tutorial was useful and I am excited to see what cool devices you create with the Raspberry Pi!

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.