Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Raspberry Pi Blueprints
Raspberry Pi Blueprints

Raspberry Pi Blueprints: Design and build your own hardware projects that interact with the real world using the Raspberry Pi

eBook
$35.98 $39.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m

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 Blueprints

Chapter 2. Portable Speaker System

In this chapter, we will build a wireless, battery-powered speaker system that can be controlled using a web browser or smartphone.

To provide the music for the speaker system, we will use the Logitech Media Server software, which is a piece of software that can be used to stream music, videos, and photos from one computer on a network to multiple other devices. It also allows us to control the playback from any computer or smartphone on the same network.

Initially, we will set up the Pi to connect it to an existing server (the one running on a laptop for instance), which is suitable for use around your home or garden. Later, we will look at how to make the system truly portable by removing the need for an existing server and network.

The system will be self contained within a standard flight case with the speakers exposed when the lid is opened as it is possible to run Logitech Media Server on the Pi itself. It is not necessary that you have any...

What you will need

This is a list of the parts that you will need for this project; specific parts have a link of where they can be purchased (it is recommended that you use these specific parts as other similar parts may need an assembly that differs from the instructions given here), and all other parts can be purchased from an electronics components store:

Tools you will need

This is a list of tools that you will need for this chapter; they can all be purchased from either an electronics components store or a tool/hardware store:

  • Drill and drill bits ranging from 3 mm to 10 mm
  • A jigsaw
  • A try square (optional)
  • A soldering iron and solder
  • A multimeter
  • A small, flat screwdriver
  • A small Posidrive screwdriver

Setting up Logitech Media Server

We will first start by downloading and installing Logitech Media Server, which is the server backend that manages the media library and controls the players based on the commands from devices that can control the server (known as controllers). Examples of controllers include the web interface and smartphone applications.

The players are devices that actually output audio (also known as Squeezebox clients), our Pi, for example. It is possible to have several controllers and players running from the same server.

To get started, go to http://www.mysqueezebox.com/download, and download the correct version for your OS. In most of the cases, the download is an executable or a package file that can be installed in the same way as any other piece of software.

Once Logitech Media Server is installed, open a web browser on the same PC and navigate to localhost:9000; you should see the Logitech Media Server web interface, as shown in the following screenshot. This allows...

Setting up the Pi as a Squeezebox client

In order to use the Pi as a Squeezebox client, we will use the open source software, squeezelite (https://code.google.com/p/squeezelite).

First, we need to install some prerequisites on the Pi which are required to run the squeezelite software, which can be done using the following command:

sudo apt-get install -y libflac-dev libfaad2 libmad0

Next, we will download the precompiled squeezelite binary from the Google Code page using wget. We will give it execute permissions to it and move it into the binary directory, allowing it to be executed like any other command-line application:

wget http://squeezelite-downloads.googlecode.com/git/squeezelite-armv6hf
sudo chmod a+x squeezelite-armv6hf
sudo mv squeezelite-armv6hf /usr/bin

Now that the client application is installed, we will do a little bit of testing to be sure that the setup is working properly. We will do this to determine the parameters that need to be passed to the client to get the best audio...

Building the electronics

The electronics for the speaker system can be split into two main sections—the power circuit and the audio circuit.

The circuit structure of the electronics is shown in the following diagram:

Building the electronics

The speaker system block diagram

Note the color coding of the wiring. Here, black shows the power ground, gray shows the audio ground, cyan shows the unamplified audio, blue shows the amplified audio, yellow represents the battery voltage, and red shows 5 V.

Note the color coding of the wiring. This is important as it is the most common way in which different signals and power supplies are identified within an electronic product. There are a few common conventions that, while are not used here, are good to know; black is always ground, red and yellow usually indicate a power supply (5 V and 12 V, respectively), and yellow and green stripes usually represent a mains earth.

For small projects, such as this, following a standard color code for wiring is not as important. Different...

What you will need


This is a list of the parts that you will need for this project; specific parts have a link of where they can be purchased (it is recommended that you use these specific parts as other similar parts may need an assembly that differs from the instructions given here), and all other parts can be purchased from an electronics components store:

Tools you will need


This is a list of tools that you will need for this chapter; they can all be purchased from either an electronics components store or a tool/hardware store:

  • Drill and drill bits ranging from 3 mm to 10 mm

  • A jigsaw

  • A try square (optional)

  • A soldering iron and solder

  • A multimeter

  • A small, flat screwdriver

  • A small Posidrive screwdriver

Setting up Logitech Media Server


We will first start by downloading and installing Logitech Media Server, which is the server backend that manages the media library and controls the players based on the commands from devices that can control the server (known as controllers). Examples of controllers include the web interface and smartphone applications.

The players are devices that actually output audio (also known as Squeezebox clients), our Pi, for example. It is possible to have several controllers and players running from the same server.

To get started, go to http://www.mysqueezebox.com/download, and download the correct version for your OS. In most of the cases, the download is an executable or a package file that can be installed in the same way as any other piece of software.

Once Logitech Media Server is installed, open a web browser on the same PC and navigate to localhost:9000; you should see the Logitech Media Server web interface, as shown in the following screenshot. This allows...

Left arrow icon Right arrow icon

Description

If you have already undertaken some simple projects with the Raspberry Pi and are looking to enter the exciting work of hardware interaction, then this book is ideal for you.

What you will learn

  • Install and configure an operating system on your Raspberry Pi Design electronics circuits using a range of standard components Interact with electronic circuits and hardware using software libraries Write efficient Python applications to control hardware and process data Build professional-quality enclosures using a range of construction methods Implement best practices to be able to power your projects while on the go Configure Linux to run your applications at specific times Make your applications interact with online data and communication services

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Mar 25, 2015
Length: 284 pages
Edition : 1st
Language : English
ISBN-13 : 9781784395858
Vendor :
Raspberry Pi
Category :
Languages :

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 : Mar 25, 2015
Length: 284 pages
Edition : 1st
Language : English
ISBN-13 : 9781784395858
Vendor :
Raspberry Pi
Category :
Languages :

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 $5 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 $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 130.97
Learning Raspberry Pi
$48.99
Raspberry Pi Sensors
$32.99
Raspberry Pi Blueprints
$48.99
Total $ 130.97 Stars icon

Table of Contents

11 Chapters
1. Raspberry Pi Pirate Radio Chevron down icon Chevron up icon
2. Portable Speaker System Chevron down icon Chevron up icon
3. Mini Retro Arcade Cabinet Chevron down icon Chevron up icon
4. GPS-enabled Time-lapse Recorder Chevron down icon Chevron up icon
5. Home Theater PC Chevron down icon Chevron up icon
6. Outdoor Weather Station Chevron down icon Chevron up icon
7. Home Security System Chevron down icon Chevron up icon
8. Remote-operated Robotic Arm Chevron down icon Chevron up icon
9. Magic Mirror Chevron down icon Chevron up icon
10. Bottle Xylophone Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
(1 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 100%
1 star 0%
Amazon Customer Jun 11, 2015
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
I received this book (hard copy) as a gift. The book is in black and white and many of the photo's, drawings and screen shots did not render well from the color versions. Some of the stuff is unreadable. I like a few of the projects but it is almost impossible to read the schematics. I would not recommend the printed copy. Don't know about the kindle version.I emailed the company asking for better illustrations, have not heard back. If they don't provide something, I am finished with Packt.
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.