TEACH YOURSELF PYTHON IN 24 HOURS PDF

adminComment(0)

Warning and Disclaimer. Every effort has been made to make this book as complete and as accurate as possible, but no warranty or fitness is implied. Python Programming for Raspberry Pi_ Sams Teach Yourself in 24 Hours Learning About the Python Development Environment Shell. Creating Exploring the. Raspberry Pi - Teach Yourself Python Programming in 24 Hours ().pdf - Ebook download as PDF File .pdf), Text File .txt) or read book online.


Teach Yourself Python In 24 Hours Pdf

Author:MERIDETH SPICKER
Language:English, Portuguese, French
Country:Uganda
Genre:Politics & Laws
Pages:341
Published (Last):09.02.2016
ISBN:274-3-49803-849-1
ePub File Size:24.55 MB
PDF File Size:18.53 MB
Distribution:Free* [*Register to download]
Downloads:49623
Uploaded by: REANNA

In just 24 sessions of one hour or less, Sams Teach Yourself Python in 24 Hours will help you get started fast, master all the core concepts of programming, and. Below are 15 free Python eBooks, plus a couple extra, that you can take with you anywhere. epub — mobi — pdf Imagine yourself working at the forefront of emerging technologies that could potentially change millions of lives, and Learn Python Programming in One Hour — Free Video Course. Sams Teach Yourself Python Programming for. Raspberry Pi. ® in 24 Hours. Richard Blum. Christine Bresnahan. East 96th Street, Indianapolis, Indiana.

You just need to double-click the icon to start the program. You can right-click anywhere on the desktop to create a new folder or file icon. At the command prompt.

A lot of applets are available for providing basic system information directly on the LXPanel for you to see. It enables you to place small programs. The LXPanel area The desktop area enables you to create shortcut icons for commonly used programs and files for easy access. When you see the Choose Boot Option window.

You are not required to provide a login name or password. The LXPanel By default. To set this up. When a new window opens and asks Would you like to reboot now?. The LXPanel area is the bar section along the top of the desktop that contains several icons refer to Figure 2. At the configuration menu.

If you change your mind and want to log in to the command line after the Pi boots again. It provides basic web browsing capabilities so you can view most websites from your Raspberry Pi desktop. The LXTerminal program provides a portal to the commandline interface.

You can click the LXTerminal icon to start the program. After the window is open. Next is the LXTerminal icon. This shows the current utilization of the system. In the following steps. The graphical chart is nice in that you can see the recent history of the CPU utilization to spot trends. Did You Change Your Password? Earlier this hour. You might see that your Pi is very busy! Wired Versus Wi-Fi In the next few steps.

After that is the CPU Utilization applet. When you do this. If you hover the mouse over it. If a window is sluggish to open in the GUI. The safest way to proceed is to connect to a wired network. A Wi-Fi connection can be a little fussy and cause you a great deal of unnecessary work due to software bugs. If you have not already done so. On the far right side of the LXPanel are four applets that display system information.

15 Free eBooks to Learn Python

Click the LXTerminal window with your mouse to select it. Type Y and press the Enter key. Once you are in the LXDE graphical interface. Problems Fetching Archives If your software update ends quickly and you get a message similar to E: Unable to fetch some archives…. The Screensaver Preferences window appears. Type Y and then press the Enter key.

If your software was already up-to-date. In the LXTerminal window. When you get the prompt back. To get your Raspbian Linux distribution software up-to-date. For the update to work correctly. Type whoami and press the Enter key. Now that your system is up-to-date. The software update will continue on its merry way until the software is all updated.

You should see the response pi displayed along with another prompt. Still in the Screensaver Preferences window. You should see the screensaver in action.

If you see another window that says The XScreenSaver daemon doesn't seem to be running on display "o: On the Screensaver Preferences window.

If a window seems slow. Click the Modes drop-down. Click anywhere on the screensaver window to return to the LXDE graphical. Now click the Preview button in the Screensaver Preferences window.

Then click it to select it. Your Raspberry Pi is working with all its might to get them opened quickly. Click anywhere on the screensaver window. Now close the Screensaver Preferences window by clicking the white X in the right corner of the window.

You know about various Debian and Raspbian documentation resources. Some Raspberry Pi users prefer the Xfce desktop. Test your screen lock by letting the desktop sit idle for the time you specified in the settings. When the LXDE graphical interface appears again. See http: Type in your password and press the Enter key.

Be sure to enter that password here in this step Now that you have looked around your Pi. Do I have to do this? If you selected the Lock option in the screensaver settings. This should return you to your desktop. Good work! Now you know how to use the LXDE graphical interface to change various items to your liking.

In a few seconds. What do you call the bar that appears along the top of a LXDE window? True or False? Task Manager c. Does this book focus on Python programming in the command line or the GUI?

You can breathe a sigh of relief now. Which graphical interface desktop environment comes with Raspbian by default?

Raspbian is based on the Debian Linux distribution. The book primarily focuses on teaching you Python programming using the GUI. LXPanel b. The startx command line command starts the LXDE window.

Which command entered at the Linux command line will reboot your Raspberry Pi? Launcher d. The Firefox browser is installed on the Raspberry Pi by default. What user account must you log into the Raspberry Pi with after loading the software?

What command line command displays the contents of a file? Raspbian is based on the Debian distribution. Start bar 9.

To reboot your Raspberry Pi from the command line. The sudo command line command allows you to run a program with the root user privileges. The LXPanel appears as a bar along the top of the desktop. The startx command launches the LXDE graphical desktop program. The raspi-config utility allows you to change basic settings in the Raspberry Pi system. The cat command line command displays the contents of a text file. You must log in using the Pi user account after first installing Raspbian.

You learn about the various tools that can help as you learn how to program in Python. Python contains a lot of rich and powerful features that make it useful for advanced programmers.

Here are a few of the major differences between the two versions: Python v3 is based on Unicode and provides a more predictable handling of it. The Python programming language is an extremely popular language and is one of the most used languages. Despite its ease of use. Syntax refers to the Python commands. Through the years. More good news: The Python programming language has easy-to-understand syntax.

Python can be used on a wide variety of platforms. Exploring Python You would not be reading this book if you were not interested in learning Python.

It also has gone through some changes. Hour 3. Linux-based systems. Python went from version 2 to version 3. Python v3 Versus Python v2 A few years ago. Unicode is the way a computer encodes.

Unicode can handle English characters and non-English characters. Type python3 -V and press Enter. These items are explained in detail later in this hour. What Is an Interpreter and a Development Environment? If you do not understand what a program interpreter does or have never heard of an interactive Python shell. Listing 3. In other words.

These checks take only a few minutes of your time. Several changes were made to Python v3 to improve its longevity as a programming language. The following Python items are preloaded: A Python interpreter An interactive Python shell A Python development environment Text editors Even though all you need should be preloaded. Checking the Python Interpreter and Interactive Shell To check the Python interpreter and interactive shell versions on your system.

Python v3 is a smaller language than Python v2. Python v2 is provided for backward compatibility purposes. Many systems support both Python v2 and Python v3. Checking for a Text Editor Finally. Mar 30 C Open the Terminal in the GUI. From that menu hover your mouse over the Programming selection and look for the Python 3 icon in its menu. You will learn later in this hour about the nano text editor.

If you do not see the Python 3 icon in the Programming menu. Figure 3. To see whether the nano text editor is installed. Type sudo raspi-config and press Enter.

If you have a typical U. If your Raspberry Pi has a wired connection to the Internet. The command simply gets an already installed tool updated. Open a terminal by clicking the Terminal icon. Press the key on the keyboard.

In this section. If your Internet connection is wireless. Type Y and then press Enter. If it is not already on. If nothing is missing. When the installs are completed.

You probably have been using your keyboard with no problems so far. If you get the message command not found. Start the GUI if it is not started automatically.

For those of you who live elsewhere. Do you see a double quote " instead of the symbol? Double-click the Terminal icon to open the terminal window. Checking the Keyboard If you live and work in the United Kingdom. When the next window says The layout of keyboards varies per country[…]. If you are from the United States. In the raspbi-config window. Once in Recovery Mode. On the next three screens listed. Press the down-arrow key until you reach the Change Keyboard Layout selection.

If you have a special keyboard. A new menu appears. Press Enter. You can reboot the Pi and go into Recovery Mode by pressing and holding the Shift key. When the next window says Please select the layout matching the keyboard for this machine. This could prevent you from logging back in to your Raspberry Pi.

It can take several seconds for the next window to open. The Wrong Keyboard If you are using a special keyboard. Both are considered correct. Be aware that there are several spelling differences between what is termed American English and British English. If something goes wrong and your keyboard acts funny. When the next window says Please select the model of the keyboard of this machine. You again see the window that says Please select the layout matching the keyboard for this machine.

Thousands of Programming Books

In the raspi-config window. A text editor does not format the text for display on a printed page. Running Python Scripts After a Python script file is created. After your Raspberry Pi reboots. Because the keyboard changes do not take effect until you reboot your system. You can fix any disasters here by rebooting the Pi and going into Recovery Mode by pressing and holding the Shift key.

Learning About the Python Interpreter Python is an interpreted programming language. Now that you have had a short introduction to the various Python tools. Development environment—This tool provides many features to assist in the development of Python programs. Learning to use these tools will help you as you learn Python programming. In a worst-case scenario. Python statements are not interpreted as they are entered in a text editor. It also contains a text editor where entire Python programs.

Text editors—A text editor is a program that allows you to create and modify regular text files. You can learn about a variety of Python statements and concepts by using different tools that fall into three primary categories: Interactive shell—The interactive shell enables you to enter a single Python statement and have it immediately checked for errors and executed.

It has an interactive shell where each Python statement is interpreted as it is entered. This tool only helps you to quickly create a Python script. Even though a script has multiple Python statements in it.

With an interpreted programming language. If the syntax is correct. GUI or Command Line? The Python interactive shell examples in this hour are shown using a terminal in the GUI. The Python interactive shell interprets.

After a little helpful information. Just type in the command python or python2 and press Enter. To enter the interactive Python shell. To get help using the interactive shell or Python statements. You can type in a Python keyword. You can also enter a module or topic. To exit help on a particular keyword. Python takes you out of the interactive shell and puts you back to the command line. Then press and release the D key. When you are done using the Python interactive shell. As you type Python syntax.

At the command-line prompt. Learning About the Python Development Environment A development environment is a single tool for creating. Often development environments color-code key syntax for easier identification of various statement features. Explore the Python Interactive Shell This is your chance to try the interactive shell yourself! Follow these steps to enter a print function statement into the Python interactive shell and then exit from it: Open a terminal by double-clicking the Terminal icon.

Print instead of print. Getting into the habit of reviewing your commands before you press the Enter key will save you lots of frustration and time later. You should see the shell display This is my first Python statement! Pretty cool! You have taken your first small step toward lots of great Python programming.

Another nice feature is automatic code completion. You are now in the Python interactive shell. To maintain consistent indentation within a script. If you do not have the GUI started automatically at boot. Take Time Before you press that Enter key. In addition to these features. It is very easy to leave out a quotation mark or use the wrong case on a command for example. To exit the Python interactive shell.

This development environment provides a built-in text editor. There are dozens of other Python development environment tools. There are lots of features in IDLE. It also is available on Windows and OS X. Notice that this window uses exactly the same verbiage as the Python interactive shell.

Interactive mode has many features that help in the creation and testing of Python scripts. The following are a few of the most important ones to help you get started in Python programming: Menu-driven options and their matching control keys—For example.

Select Add to Desktop from the drop-down menu. To use the control keys to exit IDLE instead of using the menu. With IDLE. For more information on indentation. Table 3. This is much better than finding out about syntax errors after an entire script is written.

The text editor enables you to take such actions as cut and paste text using menu-driven selections or control keys. Of course. The IDLE shell recognizes these required indentations and automatically provides them for you. Help—Because everyone needs a little help. Code completion—As you type Python statements. Color coding—The IDLE environment color-codes syntax as you type it to help you follow the logic of your Python statements.

Basic text editor—To type a Python script. IDLE provides a nice help facility. Syntax checking—When you enter a command and press Enter. For now. You should notice that the text "This is my first Python is colored green because Python considers it a string literal. This is because the print statement is considered a built-in function in Python. You should see a screen tip appear in your window. You are deliberately trying to generate a syntax error to see how IDLE handles syntactical problems.

Be sure to select Python 3 to stay on course with this hour. Look back to Table 3. This is because you did not correctly close the print function. You will be learning more about the various built-in functions in the coming hours. You will learn more about string literals. Follow these steps to test the basic features and take a look around the environment: In the IDLE window. Open IDLE by double-clicking the Python 3 icon shortcut you added to your desktop if you did add it to your desktop or by clicking the Raspberry menu icon.

Instead of correctly finishing your Python statement. You are now in the main IDLE interactive mode window. IDLE attempts to help you by giving guidance via screen tips.

You should notice that the print command has been colored violet. The color is provided to help you recognize the syntax of your Python statement and assist in the logic of your scripts.

You should get the message SyntaxError: EOL while scanning string literal.

When you are sure it is correct. If you do not have it correct. You should see output similar to what is displayed in Figure 3.

Do you want to kill it?. The IDLE interactive mode window should close. To do so. More IDLE. As your experience with Python grows. This last option is a little violent. As you did in step 9. You can find it at docs. The third way is to enter the Python statement exit. Creating and Running Python Scripts Instead of typing in each Python statement every time you need to run a program.

Here is the second line of the sample script. You will not find this script. These whole files of Python statements are called Python scripts. It was created for this tutorial. Where Is My sample. Script Storage Location It is a good idea to store your Python scripts in a standard location.

Later in this chapter. As you can see. When you click the Open button. Click the script to select it and then click the Open button. Navigate to the location of the Python script. The Open window appears. Where Is My Script Output? When you first start using IDLE.

You are now in the basic IDLE text editor. In this mode. In the basic IDLE text editor. You have two methods to choose from here as well. A new window opens. Now that you have seen two methods for running a Python script.

Time Management Proven Techniques for Making Every Minute Count

When you are all done. The text editor in IDLE might be a basic text editor. You can undo an edit. A Save As window appears.

15 Free eBooks to Learn Python

Take a look at all the options available in the Edit menu. For a complete text editor list. One is Leaf Pad. Type in the name of the file and click the Save button. The other is nano. More Text Editors More text editors are available to you than described in this tutorial. Two of them are available by default on Raspbian. To save the Python script to a file. Some are installed by default. Navigate to the directory where you want the file to be stored.

These keyboard sequences are actual nano text editor commands. It also does not do any color-coding while you type statements. The title bar of the nano editor program window is the line where the left side starts with GNU nano and the nano editor version number.

Its biggest advantage over the text editor in IDLE is that nano can be used at the command line! To start the nano text editor at the command line. In the middle of the title bar are either the words New Buffer if you are creating a new file or the name of the file you are editing.

This area is usually blank. Compared to other more complicated text editors. The bottom two lines of the nano editor window show the most commonly used keyboard command sequences. Note that the nano text editor does not perform any syntax checking while you type Python statements.

This is where you can add Python statements or make changes to existing ones. Another great source is the nano editor homepage. Tables 3. A tool is no help unless you know when to use it!

Do I have to use the nano text editor? But when you start writing scripts for yourself. As you learn the concepts in this tutorial. Syntax checking. You took a first look at how to use tools to test Python statements. Can I use a word processor to create Python scripts? Where did the Python programming language get its name? When you save a Python script. In IDLE interactive mode. In Hour 4. If you are really into pain and suffering. You can use the basic text editor within IDLE rather than nano.

Up to this point in the book. You also can try Leaf Pad or install another text editor. IDLE provides which of the following choose all that apply?

The python snake c. This is where knowing a development environment will be very helpful. Mount Python in Greece 3. Basic text editor b. Now that hard work is about to pay off. To access the nano text editor.

To access the IDLE development environment. Code completion e. Code completion. Basic text editor. Code scripting d. All of the above 6. Type in nano at the command line to access the nano text editor. IDLE provides a. The file extension for Python scripts is. Exploring the print Function A function is a group of Python statements that are put together as a unit to perform a specific task. This is important to know. You simply enter a single Python statement to perform a task for you.

It became a function when Python v3 was created. The print function. Hour 4. The basic syntax of the print function is as follows: The items to output are correctly called an argument. You get instant feedback on your Python statements from the Python interactive interpreter and can experiment with proper syntax. How to produce output from a script Making a script readable How to use variables Assigning value to variables Types of data How to put information into a script In this hour.

Producing Python Script Output Understanding how to produce output from a Python script is a good starting point for those who are new to the Python programming language.

By the end of the hour. You will read about using variables and how to assign values to variables. Standard Library of Functions The print function is called a built-in function because it is part of the Python standard functions library. Listing 4.

It also can be values stored in variables. You learn about variables later in this hour. You can see that the resulting output in both Listing 4.

Choose One Type of Quotes and Stick with It If you like to use single quotation marks to enclose string literals in a print function argument. Sometimes you need to output a character string that contains a single quote mark to show possession or a contraction. It is provided for your use when you install Python. In such a case. The argument portion of the print function can be characters. Mixing your quotation marks back and forth makes the code harder for humans to read.

If you prefer double quotation marks. Using Characters as print Function Arguments To display characters also called string literals using the print function. Protecting Single Quotes with Single Quotes You also can embed single quotes within single quote marks and double quotes within double quote marks. Formatting Output with the print Function You can perform various output formatting features by using the print function.

Another way to format output using the print function is via triple quotes. Figure 4. Triple quotes are simply three sets of double quotes """.

The new behavior can be the addition of special formatting for the output or the protection of characters typically used in syntax. Notice that you cannot see the linefeed character embedded on each code line— you can see only its effect in the output.

This is line three. This is line two. You can use three sets of single quotes instead to get the same result! By using triple quotes. This escape sequence is called a newline. Notice that it causes the output to be formatted exactly as it was in Listing 4. When the output is displayed. Quotes and Escape Sequences Escape sequences work whether you use single quotes. Table 4. Another interesting escape sequence involves displaying Unicode characters in your output.

You also can use escape sequences to protect various characters used in syntax. You are taken to the Python interactive shell. Now for Something Fun! Thanks to the Unicode escape sequence. Follow these steps: At the prompt. These hexadecimal numbers are found at www. You learned a little about Unicode in Hour 3. Now it is your turn to try this versatile Python tool. To display this symbol using the Unicode escape sequence. Create Output with the print Function This hour you have been reading about creating and formatting output by using the print function.

Each Unicode character is represented by a hexadecimal number. There are lots of Unicode characters!

Use escape sequences to. In the output. Type and displaying text on multiple lines. Learn these tips early on. At the … prompt. You can do a lot with the print function to display and format output! In fact. Formatting Scripts for Readability Just as the development environment. Using the backslash to protect either single or double quotes enables you to maintain your chosen method of consistently using single or double quotes around your print function argument..

Type triple quotes. This is where comments will help you. There are a couple of ways you can accomplish this. The first way to break up a long output character line is to use something called string concatenation. Sometimes the term end user is used instead.

Long Print Lines Occasionally you will have to display a very long output line using the print function. The character strings will be automatically concatenated by the print function! The print function handles this perfectly and is a lot cleaner looking. You should always keep the user in mind when you write your scripts. This method is demonstrated in Listing 4. A user is a person who is using the computer or running the script.

A Script User? You might be one of those people who have never heard the term user in association with computers. The problem with long output lines is that they make your script code hard to read and the logic behind the script harder to follow. The Python interpreter ignores anything that follows the hash symbol. The Python interpreter ignores any comments. Notice in Figure 4. Standard of Good Form If you are serious about Python programming.

At the very least. The good form standard is the Style Guide for Python Code located at https: To add a comment to a script. Putting these tips into practice will save you time as you write and modify Python scripts. You also can provide clarity by breaking up sections of your scripts using long lines of the symbol.

Creating Comments In scripts. You cannot use a Python keyword as a variable name. A variable is like a coffee cup. You have this function on your Raspbian system.

To look at the keywords. Python Keywords The Python keywords list changes every so often.

Understanding Python Variables A variable is a name that stores a value for later use in a script. When you name your coffee cup…err. But a coffee cup also can hold tea. The first character of a variable name cannot be a number. Think of a variable as an object holder that you can look at and use in your Python scripts.

No spaces are allowed in a variable name. A coffee cup typically holds coffee. Other rules are associated with creating Python variable names. Then the statement print keyword. This is the syntax: The print function knows they are. You put the variable name first. The first character in the variable name can be any of the following: Assigning Value to Python Variables Assigning a value to a Python variable is fairly straightforward.

A variable must have a value assigned to it before it can be used in a Python script. You can take output a step further by putting a string and a variable together as two print function arguments. These keywords cannot be used as Python variable names. After you determine a name for a variable. In Listing 4. Before the second time the print glass statement was issued. The concept here is similar. Earlier in the hour. This makes the value into a single long character string in output.

Avoiding Unassigned Variables You cannot use a variable until you have assigned a value to it. A variable is created when it is assigned a value and not before. This is especially useful and may also improve the readability of your Python script. Say that three times fast! Assigning Short Strings to Variables You can use parentheses for assigning short strings to variables.

Variables are called variables because their values can be varied. It can be reassigned. A data type defines how the variable is stored and the rules governing how the data can be manipulated.

So far. These unchanging variables are called symbolic constants.

Python determines and assigns a data type to the variable. Variable Name Case Python script writers tend to use all lowercase letters in the names of variables whose values might change. For variable names that are never reassigned values. To reassign a value. The script user is prompted to provide this information. To accomplish this task. In this case, all you need to download is an Ethernet patch cable with two RJ45 connectors. With a wired connection, you have increased network transmission speed and typically fewer network connection issues.

You also can set up your Raspberry Pi to connect via a wireless network. In this case, you need a USB wireless network adapter, which often comes with the prepackaged Raspberry Pi kits. The downside of this method is that you need to use one of your Pis USB ports. But with a wireless setup, you have much more flexibility. Nice Additional Peripherals Now that you know which peripherals you absolutely must have to run your Raspberry Pi, you can think about a few additional peripherals that will make your life with the Raspberry Pi easier.

You dont have to have a case to protect your Pi, but having one is a good idea. Cases for the Raspberry Pi come in various shapes, sizes, and colors. The case has openings on the side that allow access to the various ports.

Learn more details about this case at raspberrypi. Many Raspberry Pi enthusiasts like using a clear case to protect the Pis circuit board but allow it to be proudly displayed. Other Raspberry Pi owners need a more polished appearance for their Pi. You need to decide which kind of case meets your needs. You easily can switch your Raspberry Pi to a different case if you change your mind later! A small spark from your hand on the exposed circuit board could permanently damage your Raspberry Pi.

Other books: TOPBET MOBILE PDF

This is a good reason for keeping your Pi in a case. Portable Power Supply A portable power charger is wonderful, basically giving your Raspberry Pi power wherever it goes. A portable power charger typically contains a lithium-ion battery and can be charged via either a wall socket at home or a USB cable connected to a computer.

You can charge your portable power charger and carry it with you to power your Raspberry Pi when other power is not available. To be able to power a Raspberry Pi, a portable power charger must be able to provide the necessary 5 volts and mAmA or above depending on your power needs.

More expensive portable power chargers can be powered by multiple sources, such as your cars volt power port as well as wall sockets. You will still need to download a cable that has a USB A male connector on one end and a USB micro B male connector on the other end to connect the Pi to the portable power charger. The nice thing about this is that you can charge your portable power at the same time you are powering your Raspberry Pi at home.

Just dont forget to unplug your portable power charger when you remove or insert peripherals on your Pi! No worries. Just download a self-powered USB hub, which gets its power by being plugged into an electrical outlet.

A bus-powered USB hub draws the power it needs from the computer to which it is connected. Therefore, it would try to draw power from your Raspberry Pi.

Typically, a self-powered USB hub can supply up to mA to each device connected to it. Deciding How to download Peripherals Now that you have seen what the Raspberry Pi needs in the way of peripherals, you can decide which ones will be best for you.

You can either download the Raspberry Pi with its necessary peripherals in a prepackaged kit or download the Raspberry Pi and its necessary peripherals separately. If you decide to download a prepackaged kit, keep in mind the following points: You will spend more money on this option than if you download the Raspberry Pi and peripherals separately.

Kits vary, so be sure to download a kit that has the peripherals you want or be prepared to download any that dont come with the kit. Typically, the kits do not include a USB mouse and keyboard. Many kits have the necessary software to install an operating system preloaded on the microSD card. If you get such a kit, you can skip downloading the software and loading it onto your card section of this hour.

Getting Your Raspberry Pi Working After you have made your download decisions and received your Raspberry Pi and its necessary peripherals, you can begin to really have some fun. The first time your Raspberry Pi boots up and you realize what a powerful little machine you now own, youll really be amazed.

The following sections describe what you need to do to prepare your Pi for booting. Doing Your Research As with many other things in life, if you plan ahead and do your research, getting your Raspberry Pi up and running should go smoothly and quickly.

This up-front time and effort are very worthwhile. And many excellent resources can help. Books like this one help you get your Raspberry Pi working and troubleshoot problems. Also, there are many sources on the Internet that can assist you in your Raspberry Pi research.

One of the best comes from the Raspberry Pi Foundation. It maintains a website raspberrypi. At this site, you can also find software downloads and the latest news concerning the Raspberry Pi Foundation and the Pi itself. You should start your Raspberry Pi investigation at this resource. Exploring the Installation Software After you have completed your initial research, the next step is to download the installation software. The Raspberry Pi Foundations website, raspberrypi.

Did You Know? If this is the case, you can skip ahead to the section Plugging In the Peripherals. If you have different computers, such as a Windows machine and a Linux machine, available to you, choose the machine you feel the most comfortable using. This appendix will take you step-by-step through process and provides a more in-depth explanation than given here. The Network install only option is typically faster to download because it does not contain any preselected operating systems; however, you must have your Pi connected to the Internet for this installation to work properly.

Both versions do allow you to pick which operating system to install on your microSD card. Otherwise, your Pi must have Internet access. This will verify that no file corruption occurred while the file was being downloaded. Windows, OS X, and Linux each handle producing a checksum differently.

Check Appendix A if you need additional help with verifying the checksum. A checksum is a string of numbers and letters created by a particular mathematical algorithm. Running a files data through a checksum algorithm produces a unique checksum. If any of the files data changes, the checksum changes.

Checksums can therefore be used to ensure a files data has not been changed or corrupted. This is handy for checking downloaded files. If the checksum of the downloaded NOOBs Zip file does not match the original files checksum on the website, download the file again. When the checksums do not match, it typically means the file was corrupted as it was downloaded.

If the checksum matches, extract the zipped files and directories from the NOOBS file, which ends in. Appendix A provides more details if you need them. The SD association, sdcard. See Appendix A if you need more details. If your machine has only an SD card reader and not a microSD card reader, you will need to insert the microSD card into an SD card adapter before loading it. Be sure you use SD card formatter software to fully format and flash the microSD card back to its factory state.

Unlike moving an operating system, you can just copy the files to the microSD cardno image writer program or utility is needed to move them. By the Way: Need More Help? See elinux. Go through the following steps to ensure that everything is working correctly: 1. Put the microSD card into the card reader port on the Raspberry Pi.

Plug in the power cord to the Raspberry Pi. Do not attach the power cord to a power source yet. Therefore, when you plug it into the power source, it automatically boots. With your monitor or TV powered off, plug the other end of the cable into it. Turn on the monitor or TV. When the Pi boots, you must press the number 3 or 4 on your keyboard to get output.

See the Troubleshooting Your Raspberry Pi section for more details. You are now ready for the initial test drive exciting, isnt it?! Sit down in front of your monitor or TV and plug the Raspberry Pi power cord into a power source. If nothing happens, go directly to the Troubleshooting Your Raspberry Pi section, later in this hour.

Typically you should see a multicolored block on your display screen followed by a message from the NOOBS software that it is repartitioning your drive microSD card. Press Enter on the keyboard, or use the mouse to select put an X in the box next to Raspbian.

However, this tutorial uses only the Raspbian operating system, so select it if you want to follow along.Making Python the official programming language of the popular Raspberry Pi was genius.

Next is the LXTerminal icon. One of the best comes from the Raspberry Pi Foundation. Click Here for the Ebook.

Steve Klabnik and Carol Nichols Publisher: