|
Published:
August 24, 2021

Raspberry Pi For Dummies

Overview

A recipe for having fun and getting things done with the Raspberry Pi 

The Raspberry Pi makes it easy to learn about computers and computer programming, and Raspberry Pi For Dummies makes it even easier! Using this extremely affordable and compact computer, you can learn to code in languages like Scratch and Python, explore how electronics work, create computer-generated buildings in Minecraft and music in Sonic Pic, become Linux-savvy, make Internet-of-Things devices, or just play around! This book gets you up and running on your Raspberry Pi, starting with setting it up, downloading the operating system, and using the desktop environment. Then, the only limit is your imagination! It doesn’t matter whether you have a Raspberry Pi 4, Raspberry Pi 400, Raspberry Pi Zero W or an older model: we’ve got you covered. 

Raspberry Pi For Dummies explores the latest technology—the Raspberry Pi 4 and 400, Scratch 3 programming language, new games bundled with the Raspberry Pi, and the hottest Add-Ons out there. This introductory guide is the perfect place to start if you want to get a taste of everything the Raspberry Pi can do! 

  • Set up your Raspberry Pi, install the operating system, and connect to the Internet 
  • Learn the basics of the Linux desktop and Linux shell so you can program, work, and play  
  • Use Python, Scratch, and Sonic Pi to write your first programs and make games and digital music 
  • Discover how circuits work hand-in-hand with your Pi 

If you want to make the most of the Raspberry Pi for school, work, or play, you’ll love this easy-to-read reference.

Read More

About The Author

Sean McManus is an expert technology and business author. His previous books include Mission Python, Coder Academy, and Cool Scratch Projects in Easy Steps.

Mike Cook is a former professor in physics at Manchester Metropolitan University. His other books include Raspberry Pi Projects and Raspberry Pi Projects For Dummies.

Sample Chapters

raspberry pi for dummies

CHEAT SHEET

The Raspberry Pi is perhaps the most inspiring computer available today. It comes with the tools you need to start making your own software, and you can connect your own electronic inventions to it. These tips show you how to discover and install great free software on your Raspberry Pi and how to program in Scratch.

HAVE THIS BOOK?

Articles from
the book

Your Raspberry Pi can perform all the tricks when it comes to music. One of the best features of Sonic Pi is the live loop, which enables you to change your music while it repeats.The following program modifies the previous example by turning it into a live loop and adding tempo (BPM is short for beats per minute), synth, and option choices.
Your Raspberry Pi uses RFID. There are basically three different types of RFID systems available on the market, mainly distinguished by which frequency range they use. All systems consist of two parts: a tag or card and a reader. The reader extracts binary bits from a tag or card using radio waves, so no wires are needed between the reader and the tag or card.
Before you can play back content on your Raspberry Pi, you need to tell Kodi where it can find it. You have several options for providing it: USB drive: You can plug a USB drive that stores your movies or music directly into your Pi or its USB hub. A message appears in the top right, confirming that the USB device is being mounted, which means it’s being prepared so that you can use it.
Your Raspberry Pi can do all kinds of things when it comes to music. You can add special effects and even synchronize your music with a drumbeat. Let’s check it out. Adding special effects to music on your Raspberry Pi You can play a sample and add effects to it, including distortion, echo, and reverb. There is a full list of effects (also known as Fx) in the Help pane, and you can also find them using the autocomplete feature.
Need to do some tweaking? You can change the settings on your Raspberry Pi easily enough. The cogwheel at the top of the main menu gives you access to the settings for Kodi, divided into several sections. They include, among others: Player settings, covering options such as whether the next song or video plays automatically, whether there is cross-fading between songs, and the use of subtitles.
You can connect a display device to your Raspberry Pi in one of two ways, depending on the type of screen you have available. This means one of the Raspberry Pi’s display sockets will always be unconnected. These instructions assume that you’re using a monitor or TV, but there is also an official Raspberry Pi touchscreen that connects using the Display socket on the left of the board (not available on the Pi Zero or Zero W).
There are lots of accessories and add-ons available for the Raspberry Pi, but the Raspberry Pi Camera Module has the rare status of being an official product from the Raspberry Pi Foundation, so here you see how to connect it. The camera module is a small circuit board, with a strip of ribbon cable that plugs directly into the Raspberry Pi board.
You can create directories on your Raspberry Pi. As you may know from other computers you’ve used, it’s a lot easier to manage the files on your computer if they’re organized into directories (or folders). You can easily create a directory in your home directory using the command mkdir:<strong>mkdir work</strong>To save time, use one command to create several directories, like this:pi@raspberrypi ~ $ <strong>mkdir work college games</strong>pi@raspberrypi ~ $ <strong>ls</strong>Downloads python_games work college Music Desktop Pictures Documents games Public Templates VideosYou might see additional files here, especially if you followed the earlier examples to make some text files, but the important thing is that one command made three new directories for you.
You can discover new software to install using the command line, but there's also a friendly menu system you can use in the desktop environment. On the Applications menu, hover over the Preferences option and click Add/Remove Software to get started. You need to have an active Internet connection.The menu looks like this:In the top left is a search box, where you can enter the name of a program you're looking for, or a phrase such as puzzle games to explore what's available.
Let’s do some fun stuff with your Raspberry Pi’s LEDs: mixing colors. Yes, you can turn on just one LED at a time, and that will give you one of the three colors — red, blue, or green. However, turn two on and the colors will mix in a way known as additive mixing.The primary colors are red, green, and blue. Mixing them together gives you other colors, the so-called secondary colors.
You can use two commands on your Raspberry Pi for removing directories. The first one, rmdir, is the safer of the two because it refuses to remove directories that still have files or directories inside them. Use it with the name of the directory you want to remove — for example, books, — like this:<strong>rmdir books</strong>If you want to prune a whole branch of the directory tree, you can use the rm command to remove a directory and delete anything inside it and its subdirectories.
Claws Mail is an open source email program that is preinstalled on your Raspberry Pi. Find it in the Internet category of the Applications menu. If you want to use email on your Raspberry Pi, you need to know the details of the server for sending and receiving your email. Your email provider most likely publishes this information on its website.
Pygame Zero lays down strict rules about what your files can be called and where they should be saved on your Raspberry Pi. Filenames must be in all lowercase, which helps to ensure that they work across different computers. Your images must be stored in a folder called images, and your sounds in a folder called sounds.
The Raspberry Pi can play back full HD 1080p video, which makes it ideal as the heart of a cheap and low-powered media center. The NOOBS software includes two Linux distributions, both based on Kodi, that turn your Raspberry Pi into a media center. The choices are OSMC and LibreELEC.Because they’re both based on the Kodi core, they have many similarities.
Connecting a Raspberry Pi Camera Module is the first step. Once you have connected your Raspberry Pi Camera Module, it’s a good idea to test whether it’s working correctly. Make sure the camera is enabled: Go into the Raspberry Pi Configuration tool, click Interfaces, and select Enabled beside the Camera option.
There’s a new kid on the block when it comes to accessing the GPIO pins in Python on your Raspberry Pi: the GPIO Zero library. Don't confuse this with the Pi Zero — the two are not related. The GPIO Zero library takes the class method approach to control, as opposed to the function method approach of RPi.GPIO and other, similar libraries.
You can use your Raspberry Pi to compose your own tunes or Sonic Pi can also use samples, which are snippets of music that you can manipulate, such as by changing their speed or adding effects to them. Sonic Pi includes a wide range of samples, and you can see a list of them by showing the Help pane and then using the Sample button in the bottom left.
Sonic Pi enables you to use proper note names instead of MIDI numbers to play music on the RaspberryPi by using the name of the note (a letter from A to G), plus the number of the octave it’s in.For example, to play a middle C, you can useplay :c4To play the B one note before it, which is in the next lowest octave, you would useplay :b3The Log shows that Sonic Pi plays notes 60 and 59 respectively.
You can access GPIO pins on your Raspberry Pi with Python. Unlike Scratch's graphic-based program blocks, Python uses entirely text-based instructions. Its great power is that the basic Python language can be extended to do more things by the use of libraries. These are functions that can be written in Python or any other language to extend what Python can do.
Your Raspberry Pi can shuffle your music if you want to play random songs. Take a look below. The bracketed sections are lists, similar to lists in Python. You can add different instructions (or methods) to the lists to change the order of the items in them. For example, try this, using the reverse method:play_pattern_timed [:c4, :e4, :g4, :c5], [0.
It’s easy to look at your digital photos and other images using PIXEL. Among the accessories on the Applications menu is the Image Viewer. You can start it from the menu (in the Accessories folder) or by double-clicking or right-clicking an image file.The Image Viewer displays the picture, with a toolbar underneath it.
If you want to share the Raspberry Pi with different family members, you could create a user account for each one so that they all have their own home directory. The robust permissions in Linux help to ensure that people can’t accidentally delete each other’s files, too.You might already know that users can be members of groups.
The Kodi screen on your Raspberry Pi looks like what you see here. LibreELEC uses Kodi’s simple interface, which is designed to work with only a remote control. If you’re using a remote control, you should find the interface intuitive. The main menu on the left and the empty library area on the right. This shows how Kodi appears before media is added.
The Raspberry Pi was created partly to inspire the next generation of programmers, and Scratch is the perfect place to start. With it, you can make your own cartoons and games and discover some of the concepts that professional programmers use every day.Scratch is designed to be approachable for people of all ages.
The Raspberry Pi is perhaps the most inspiring computer available today. It comes with the tools you need to start making your own software, and you can connect your own electronic inventions to it. These tips show you how to discover and install great free software on your Raspberry Pi and how to program in Scratch.
There are basically two types of ready-made boards for the Raspberry Pi: those designed for making it easy to get access to the GPIO pins and those with components that have already been soldered up.Since the introduction of the Raspberry Pi in 2012, many companies have produced ready-made boards with all sorts of components already built on.
Check out the screen layout for Sonic Pi. You might see some differences between your screen layout and the one you see, but the fundamentals should be the same. Click to enlarge the window if necessary. On the left is the Editor, where you type in your code. On the right is the Log, where Sonic Pi tells you what it’s doing as it plays your music.
The two versions of Scratch on your Raspberry Pi share the same core blocks, but there are a few differences in Scratch 2 to be aware of: Events blocks: This is a new category of blocks introduced in Scratch 2. It includes blocks that were categorized as Control blocks in the older version of Scratch. If the block name starts with “when” or “broadcast,” you'll probably find it in the Events part of the Blocks Palette in Scratch 2.
https://cdn.prod.website-files.com/6630d85d73068bc09c7c436c/69195ee32d5c606051d9f433_4.%20All%20For%20You.mp3

Frequently Asked Questions

No items found.