Raspberry Pi: How to Get Started Opensource.Com
Total Page:16
File Type:pdf, Size:1020Kb
Opensource.com Raspberry Pi: How to get started OPENSOURCE.COM ..................................................................... ABOUT OPENSOURCE.COM What is Opensource.com? publishes stories about creating, OPENSOURCE.COM adopting, and sharing open source solutions. Visit Opensource.com to learn more about how the open source way is improving technologies, education, business, government, health, law, entertainment, humanitarian efforts, and more. Submit a story idea: opensource.com/story Email us: [email protected] . 2 RASPBERRY PI: HOW TO GET STARTED . CC BY-SA 4.0 . OPENSOURCE.COM . ABOUT THE AUTHOR ANDERSON SILVA GREW UP IN BRAZIL, and wrote his first program at ANDERSON SILVA the age of 10 using Logo. He moved on to programming in BASIC shortly thereafter, and by the time he was in High School he was coding in Pascal. When he started college in the US, he learned C, C++, Java and had several developer jobs programming with server-side languages for web development like: Coldfusion, Perl, Php, etc. He was introduced to Linux by his uncle back in 1996. In the early 2000s Anderson transitioned from being a developer to more of a system administrator/release engineer. In 2007, one of his professional goals was achieved when he joined Red Hat as a Release Engineer in IT. Since then he has worked in several roles at Red Hat in both IT Operations, Engineering and Infosec. He has an RHCE and RHCA and is an active Fedora package maintainer. RASPBERRY PI: HOW TO GET STARTED . CC BY-SA 4.0 . OPENSOURCE.COM 3 CoNTENTS ............................................................................. ChapTERS Which Raspberry Pi should you choose? 5 How to buy a Raspberry Pi 6 How to boot up a new Raspberry Pi 7 Learn Linux with the Raspberry Pi 8 5 ways to teach kids to program with Raspberry Pi 9 3 popular programming languages you can learn 10 with Raspberry Pi How to keep your Raspberry Pi updated 11 How to use your Raspberry Pi for entertainment 12 Emulators and Native Linux games on the Raspberry Pi 13 Let’s get physical: How to use GPIO pins on the 14 Raspberry Pi Learn about computer security with the Raspberry Pi 15 and Kali Linux Do advanced math with Mathematica on the Raspberry Pi 16 Contribute to the Raspberry Pi community 17 . 4 RASPBERRY PI: HOW TO GET STARTED . CC BY-SA 4.0 . OPENSOURCE.COM . WHICH RASPBERRY PI SHOULD YOU CHOOSE? Which Raspberry Pi should you choose? In the first chapter in our guide on getting started with Raspberry Pi, learn the three criteria for choosing the right model for you. CHAPTER in a guide THIS IS THE FIRST on getting started with the Raspberry Pi [1]. Although the guide is geared towards people who have never used a Raspberry Pi or Li- nux or programming, there will definitely be things for more experienced readers—and I encourage those readers to leave comments and tips that build on what I write. If every- one contributes, we can make this guide even more useful for beginners, other experienced readers, and even me! So, you want to give the Raspberry Pi a shot, but you don’t know which model to buy. Maybe you want one for your classroom or your kid, but there are so many options, and you aren’t sure which one is right for you. need a USB hub for your mouse and keyboard, possibly a wireless adapter, and some sort of display adapter. Un- Raspberry Pi boards—https://www.raspberrypi.org/products/ less you have most (if not all) of the peripherals needed for whatever you want to do with your Raspberry Pi, make sure to add those to your Pi budget. Also, in some countries, a Raspberry Pi on its own (even without any peripherals) may be a cost burden for many students and teachers. • Availability: Finding the Raspberry Pi you want can vary depending on your location, as it may be easier (or harder) to get certain versions in some countries. Availability is an even bigger issue after new models are released, and it can take a few days or even weeks for new versions to become available in your market. • Purpose: Location and cost may not affect everyone, but every buyer must consider why they want a Raspberry Pi. The eight different models vary in RAM, CPU core, CPU speed, physical size, network connectivity, peripheral ex- pansion, etc. For example, if you want the most robust solution with more “horsepower,” you probably will want the Raspberry Pi 3 B+, which has the most RAM, fastest CPU, and largest number of cores. If you want something that won’t require network connectivity, won’t be used for CPU-intensive work, and can be hidden in a small space, you could go with a Raspberry Pi Zero. Wikipedia’s Raspberry Pi specs chart [2] is an easy way to compare the eight Raspberry Pis models. My three main criteria for choosing a new Raspberry Pi are: Now that you know what to look for in a Raspberry Pi, in • Cost: Don’t just consider the cost of the Raspberry Pi board, the next chapter, I will explain how to buy one. but also factor the peripherals you will need in order to use it. In the US, the Raspberry Pi’s cost varies from $5 (for the Links Raspberry Pi Zero) to $35 (for the Raspberry Pi 3 B and [1] https://www.raspberrypi.org/ 3 B+). However, if you pick the Zero you will probably also [2] https://en.wikipedia.org/wiki/Raspberry_Pi#Specifications . RASPBERRY PI: HOW TO GET STARTED . CC BY-SA 4.0 . OPENSOURCE.COM 5 How TO BUY A RASPBERRY PI ........................................................... How to buy a Raspberry Pi Find out the best ways to get a Raspberry Pi in the second chapter in our getting started guide. CHAPTER IN THIS GUIDE on getting start- mini-computer. I had so many lying around that I just told THE FIRST ed with Raspberry Pi offered some them to keep one! advice on which model you should buy [1]. Now that you have an idea of which version you want, let’s find out how Don’t forget the extras to get one. One final thought: don’t forget that you’ll need some pe- The most obvious—and probably the safest and sim- ripherals to set up and operate your Raspberry Pi. At a plest—way is through the official Raspberry Pi website [2]. If minimum, you’ll need a keyboard, an HDMI cable to con- you click on “Buy a Raspberry Pi” from the homepage, you’ll nect to a display (and a display), a Micro SD card to install be taken to the organization’s online store [3], where you can the operating system, a power cord, and a mouse will be find authorized Raspberry Pi sellers in your country where handy, too. you can place an order. If your country isn’t listed, there is If you don’t already have these items, try borrowing a “Rest of the World” option, which should let you put in an them from friends or order them at the same time you buy international order. your Raspberry Pi. You may want to consider one of the Second, check Amazon.com or another major online starter kits available from the authorized Raspberry Pi technology retailer in your country that allows smaller vendors—that will avoid the hassle of searching for parts shops to sell new and used items. Given the relatively low one at a time. cost and size of the Raspberry Pi, it should be fairly easy Now that you have a Raspberry Pi, in the next chapter in for smaller shop owners to import and export the boards this guide, we’ll install the operating system and start using it. for reselling purposes. Before you place an order, keep an eye on the sellers’ reviews though. Links Third, ask your geek friends! You never know if someone [1] https://opensource.com/article/19/2/which-raspberry-pi- has an unused Raspberry Pi gathering dust. I have given should-you-get at least three Raspberry Pis away to family, not as planned [2] https://www.raspberrypi.org/ gifts, but because they were just so curious about this [3] https://www.raspberrypi.org/products/ Raspberry Pi Zero W Starter Kit V-Kits Raspberry Pi 3 B+ Starter Kit . 6 RASPBERRY PI: HOW TO GET STARTED . CC BY-SA 4.0 . OPENSOURCE.COM . How TO BOOT UP A NEW RASPBERRY PI How to boot up a new Raspberry Pi Learn how to install a Linux operating system, in the third chapter in our guide to getting started with Raspberry Pi. BEEN FOLLOWING along in this guide, The easiest way to install Raspbian is with NOOBS [4], IF YOU’VE you’ve chosen [1] and bought [2] which stands for “New Out Of Box Software.” Raspberry Pi your Raspberry Pi board and peripherals and now you’re offers great documentation for NOOBS [5], so I won’t repeat ready to start using it. Here, in the third chapter, let’s look the installation instructions here. at what you need to do to boot it up. NOOBS gives you the choice of installing the following op- Unlike your laptop, desktop, smartphone, or tablet, the erating systems: Raspberry Pi doesn’t come with built-in storage. Instead, it uses a Micro SD card to store the operating system and • Raspbian [6] your files. The great thing about this is it gives you the • LibreELEC [7] flexibility to carry your files (even if you don’t have your • OSMC [8] Raspberry Pi with you).