Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Raspberry Pi Essentials
Raspberry Pi Essentials

Raspberry Pi Essentials: Get up and running with the Raspberry Pi to develop captivating projects

Arrow left icon
Profile Icon Jack Creasey
Arrow right icon
₱579.99 ₱1346.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.8 (5 Ratings)
eBook Apr 2015 212 pages 1st Edition
eBook
₱579.99 ₱1346.99
Paperback
₱1683.99
Subscription
Free Trial
Arrow left icon
Profile Icon Jack Creasey
Arrow right icon
₱579.99 ₱1346.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.8 (5 Ratings)
eBook Apr 2015 212 pages 1st Edition
eBook
₱579.99 ₱1346.99
Paperback
₱1683.99
Subscription
Free Trial
eBook
₱579.99 ₱1346.99
Paperback
₱1683.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Raspberry Pi Essentials

Chapter 2. Configuring the Raspberry Pi Desktop and Software

The Pi now boots to the desktop graphical interface, which means you have a base system on which to start project development. Like any other desktop PC, you will eventually want it configured to suit your development style. In this chapter, we maximize the utility of the desktop graphical tools and develop code for your projects. We don't expect you to become a Linux command-line guru. Instead, we will use simpler desktop tools such as editors, file managers, and the Python interactive development shell, IDLE3.

After completing this chapter, you will be able to:

  • Install networking and graphical networking tools
  • Keep your computer system up to date
  • Configure the Pi desktop to suit your development needs
  • Configure Ethernet and Wi-Fi networking connectivity options
  • Explain code development options available by default
  • Create Bash shell scripts and have them run automatically
  • Create Python 3 scripts and have them installed...

Hardware and software networking configuration

Since we will need Internet connectivity to install tools and utilities, let's now look at the Pi hardware and software networking configuration in more detail; the wireless configuration is first since many project designers may prefer a wireless connection.

There are many Pi-compatible wireless adapters and you may even have bought one as part of your initial kit. The most common recommendation is that you use a Wi-Fi adapter that uses the Realtek RTL8188CUS chipset. The driver for this chipset (rtl8192cu) is included in the Raspbian distribution, so enabling this particular type of Wi-Fi adapter is easy.

First, you need to install the adapter, and then we will look at the connection status of the USB devices on the Pi to ensure it is detected:

  1. Plug the Wi-Fi wireless adapter into any available USB port and unplug the Ethernet connection if you have one
  2. Open a terminal window and type lsusb
  3. In the same window, type lsusb –t

The lsusb...

Configuring the Raspberry Pi desktop and software

Because you enabled boot to the graphical desktop during the final installation configuration in Chapter 1, Getting Started with Raspberry Pi, each time you boot the Pi, the desktop automatically appears. The Pi is now very much like a compact version of your desktop PC, laptop, or even iPad.

The desktop environment is called the lightweight X11 desktop environment (LXDE). It is installed on top of a window manager, which in this case is Openbox. Let's take a quick tour of some important elements of the desktop, and at the same time set up some preferences and options.

The information to follow will provide you with the guidance you need to install a screensaver package and set up a desktop accelerator:

  • On the left-hand end of the taskbar is the main menu icon. When you click on it, one menu option offered is the ability to shut down. If you click on the shutdown menu selection, the End Session window opens. This allows you to select...

Desktop and file manager accelerators

When you work in a graphical desktop, one of the most used utilities is the file manager (PCManFM). In a development environment, there is often the need to transition from a low-security-privilege (user) context to a high-security-privilege (root) context to complete tasks. The current file manager does not allow this to happen. PCManFM will allow you to add defined actions to its context menus that can help to reduce the need for low-level command-line editors and Terminal session commands. In addition, there could be a constant need to start multiple Terminal windows and to move between multiple desktop views to reduce the clutter of open windows.

Now, let's set up a useful desktop accelerator. Find a clear location on the desktop with your mouse pointer and right-click on it. The menu that comes up is from the file manager and is not usually very useful. To replace it with some new functionality, follow these steps:

  1. Right-click on the desktop...

Project 1 – Building a talking clock with a Bash script

This project will expose you to the Bash shell scripting language. You will build a talking clock that tells the time every minute using an executable and an Internet-based web service. Once the clock is up and running, you will use an automation tool called Cron to schedule and run tasks at a particular time or at regular intervals.

The talking clock will have the following features and functions:

  • Automatically start every minute and run in the background without any visible interface to the desktop user
  • Read the system time to get the local time on your Pi
  • Produce a correctly formatted time string to announce the time, for example, you might say "The time is now nine fifteen AM"
  • Convert the time string to audio and play it
  • Exit the script

Creating project files and directories

First, you will open a Terminal window to create the project files and directories, update our system, and load a new utility application:

  1. At the command...

Building a talking clock with Python 3

Python is often used as a scripting language when the speed of execution is a secondary consideration. In this situation, it can provide much more script flexibility and improved manageability compared to a Bash script.

The GUI development environment for Python 3 is called IDLE3, and if you double-click on the icon, it will, by default, open a single window called Python Shell. Although you can enter commands directly in the shell interface, it will be beneficial for you to learn from the start how to create and save program files using the Python editor.

If you are not familiar with Python 3, there are many online tutorials that introduce basic programming techniques. An excellent overview and tutorial is available from the Python.org website at http://docs.python.org/3.2/tutorial. There is also an excellent help system in Python Shell that you can use to develop programs in the editor window.

To access the help system, at the Python Shell command prompt...

Summary

Now that we've completed the second chapter, let's review some of the important tasks you performed in this chapter:

  • Installed graphical networking tools
  • Configured the Pi desktop to suit your development needs
  • Configured the Ethernet and Wi-Fi networking connectivity options
  • Created a talking clock to better understand Bash scripts and Python 3 programming language

You also learned how to do most of this work directly from the desktop, minimizing the use of command-line sessions.

At some point in your project design career, you may want to become a command-line geek, but it would require building expertise at the command-structure level.

In the next chapter, you will learn how to connect PiCam or multiple webcams and to acquire and store video streams and images.

Left arrow icon Right arrow icon

Description

Programmers new to the Raspberry Pi and novice programmers with little to no experience with micro board computing will find the book useful. A basic knowledge of programming languages in general will prove useful for a better understanding of the topics.

Who is this book for?

Programmers new to the Raspberry Pi and novice programmers with little to no experience with micro board computing will find the book useful. A basic knowledge of programming languages in general will prove useful for a better understanding of the topics.

What you will learn

  • Build your own fullfledged Raspberry Pi hardware and install the Raspbian OS
  • Configure the Raspberry Pi development environment and get acquainted with OS configuration and tools
  • Build a camerabased project using PiCam and USB cameras
  • Build and configure a stereo audio system using VLC
  • Explore the Raspberry Pi GPIO to connect to the outside world
  • Utilize and explore extensive I2C interface support built into the Raspberry Pi to enhance your system
  • Configure remote access and battery power for a mobile Raspberry Pi
  • Build a fully functional Raspberry Pi linefollowing robot using PiCam

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 28, 2015
Length: 212 pages
Edition : 1st
Language : English
ISBN-13 : 9781784396923
Vendor :
Raspberry Pi
Category :
Concepts :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Apr 28, 2015
Length: 212 pages
Edition : 1st
Language : English
ISBN-13 : 9781784396923
Vendor :
Raspberry Pi
Category :
Concepts :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just ₱260 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just ₱260 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 5,868.97
Raspberry Pi Essentials
₱1683.99
Raspberry Pi Sensors
₱1683.99
Learning Raspberry Pi
₱2500.99
Total 5,868.97 Stars icon
Banner background image

Table of Contents

9 Chapters
1. Getting Started with Raspberry Pi Chevron down icon Chevron up icon
2. Configuring the Raspberry Pi Desktop and Software Chevron down icon Chevron up icon
3. Raspberry Pi and Cameras Chevron down icon Chevron up icon
4. Raspberry Pi Audio Input and Output Chevron down icon Chevron up icon
5. Port Input and Output on the Raspberry Pi Chevron down icon Chevron up icon
6. Driving I2C Peripherals on the Raspberry Pi Chevron down icon Chevron up icon
7. Going Mobile with Raspberry Pi Chevron down icon Chevron up icon
8. Creating a Raspberry Pi Line-following Robot Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.8
(5 Ratings)
5 star 0%
4 star 80%
3 star 20%
2 star 0%
1 star 0%
Stareagle Oct 08, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
The Raspberry Pi Esentials book is a great resource for those starting to dabble in this area. It has clear and concise information to get you up and running quickly.It even goes into some detail on various electronic projects that can be completed using the Raspberry PI which is easy to follow and understand.To avoid clutter a lot of the code files are available for download in a single zip file. This also aleviates the error factor of trying to type in the code from the pages of the book and can simply be imported when needed.Although it is a beginners kind of book, I would say the user would need at lease some experience of the Raspberry Pi and an awarenes of electronics in general.Overall a great book and I would recommend it to others.
Amazon Verified review Amazon
Jaume Aragay Badia Oct 11, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Great introduction level book to the Raspberry Pi but not for newbies. If you know linux and electronics and want to get a first contact with the Raspberry Pi, this is your book; if not, you can find other RasPi books specifically for newbies with step by step instructions.The book is full of little gold nuggets in the comments for real life situations. Some code is not listed on the book pages but is referenced for downloading. This has a good side: no typing errors; but also a bad one, at least for me, I can't see everything in one place to follow the whole thing, that's why I did not give it the fifth star.The chapters cover these topics:- The unboxing and first time booting of the RasPi and it's configuration.- The use of cameras with the RasPi and video resources including motion detection procedures.- The RasPi audio input and output.- The real world interaction through the input and output pins of the RasPi.- The use of different peripherals including I2C ones to run PWM on servos (if you don't understand what I say here, this may not be your book).- What's needed to make a RasPi mobile (autonomous).- A final project: A RasPi line-following robot.All the chapters have their own (very well crafted and interesting) projects and some of them are merged in the robot project at the end of the book.
Amazon Verified review Amazon
Gopinath Palaniappan Oct 09, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Raspberry Pi Essentials"Get up and running with the Raspberry Pi to develop captivating projects"Author: Jack CreaseyAs the name suggests, its a book to teach you the basics of Raspberry Pi hardware. Its also supplemented with a number of examples and mini projects to keep you occupied for days.* C1 : Includes basic setup of Raspberry Pi, Booting into Rasbian* C2 : Is all about configuration of desktop, networking/wifi and a talking clock* C3 : Helps you setup a webcam or PiCam to capture video. 3 mini projects for security camera application* C4 : Deals with Audio input and output. Includes 2 mini projects to create your own internet radio* C5 : I/O ports* C6 : Interfacing I2C peripherals* C7 : Making it portable* C8 : Building a line follower robotThere is a lot covered in the book. Initial chapters does not require anything but the Raspberry Pi. Later chapters do require additional peripherals and kits. I loved the last chapter that teaches you to assemble a line follower robot.Link to the books:http://www.amazon.com/dp/1784396397 [$14.59 kindle/$29.99 print]https://www.packtpub.com/hardware-and-creative/raspberry-pi-essentials [$23.99 ebook/$29.99 print+ebook]
Amazon Verified review Amazon
Dustin Marx Jun 12, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
"Raspberry Pi Essentials" packs much detailed information into its pages. Many of the code listings used in the numerous projects are not fully contained in the book, but are instead available via download. This allows the pages to focus on text, graphics, and images. The book covers diverse topics such as selecting and configuring a Raspberry Pi, connecting cameras to the Raspberry Pi, working with audio input and output, making the Raspberry Pi mobile, and building a Raspberry Pi-based robot to follow a line."Raspberry Pi Essentials" features clear graphics and screen snapshots that illustrate the concepts being discussed. Some code samples need to be downloaded rather than being present in the pages of the book. This works with the author's approach to minimize knowledge of coding and keep the focus on the Raspberry Pi. The code samples can be easily downloaded in a single ZIP file."Raspberry Pi Essentials," as its title suggests, covers Raspberry Pi essentials, but covers them in a highly detailed manner that is not always the case with "essentials" books. "Raspberry Pi Essentials" is probably best suited for someone with at least minimal experience with Raspberry Pi and readers of the book should definitely have access to a Raspberry Pi and other described components to work with as the book is read. The book is project-heavy and likely to be most useful to those who implement the projects.I reviewed a PDF version of this book provided by Packt Publishing.
Amazon Verified review Amazon
MRL Oct 09, 2015
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
“Raspberry Essentials” aims to illustrate the basics of Raspberry Pi, from installation to advanced use. The book is meant for both experienced DIY and first time amateurs.In the first part of the book, it wouldn’t have hurt to include more details for first time users.As an example, at page 14:“Ctrl + Alt + Backspace: Use this key combination to log out of the current Xsession user (use Xsession to login).Ctrl + Alt + F1: Use this key combination to switch to a command session on tty1 (type exit to close)Ctrl + Alt + F7: Use this key combination to switch back to the graphical desktopCtrl + Alt + F2 through F6: Use this key combination to switch to a command session on tty2-tty6.”The passage above works for an experienced user -- meaning someone who knows developer tools and has a basic knowledge of administrative tasks of a Linux OS -- but I’m afraid that a first time user who has never seen a Linux OS wouldn’t understand what is a Xsession, an tty1, tty2 and so on!If you are a Linux guy, this book will prove to be very useful, thanks to plenty of tips and hands-on tutorial that will help you to achieve various tasks, from network configuration to appropriate monitor customization. In addition to that, readers will learn, step by step, to keep the development environment up to date.Some complex tasks and configuration files can be downloaded from a web site.Unfortunately some bash scripts (or python scripts) are presented in their final form, without a good explanation about all their functions. This way, programmers can use them as a “recipe” or should put in a lot of work on their own to try to fully understand them.Chapter 5, "Port Input and Output on the Raspberry Pi", and Chapter 6, "Driving I2C Peripherals on the Raspberry Pi", are much more useful and well developed but, in my opinion, the scripts could have used a deeper explanation; it would have tremendously improved the whole presentation.Chapter 7, "Going Mobile with Raspberry Pi", and 8, "Creating a Raspberry Pi Line-following Robot", are great reading materials for DIY aficionados. They pick up some ideas from previous chapters (like using a camera) and they add great advice for someone who needs only a few tips to achieve his goals. Maybe this is the real target of the book: a DIY fan with a lot of time to try something new and an outstanding ability to learn in autonomy.I would have liked the book more if the author had developed the topics in a way that could have been easier to understand. Maybe the author could have focused on less topics. I would recommend to revise the book paying more attention to every single subject from the beginning to end.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.