You are on page 1of 29

Everything

You want to Know About


Raspberry Pi

www.TechnicalBooksPDF.com
Copyright 2015 by Big K Publishing - All rights reserved.


This document is geared towards providing exact and reliable information in regards to the
topic and issue covered. The publication is sold with the idea that the publisher is not
required to render accounting, officially permitted, or otherwise, qualified services. If
advice is necessary, legal or professional, a practiced individual in the profession should
be ordered.

- From a Declaration of Principles which was accepted and approved equally by a
Committee of the American Bar Association and a Committee of Publishers and
Associations.

In no way is it legal to reproduce, duplicate, or transmit any part of this document in either
electronic means or in printed format. Recording of this publication is strictly prohibited
and any storage of this document is not allowed unless with written permission from the
publisher. All rights reserved.

The information provided herein is stated to be truthful and consistent, in that any liability,
in terms of inattention or otherwise, by any usage or abuse of any policies, processes, or
directions contained within is the solitary and utter responsibility of the recipient reader.
Under no circumstances will any legal responsibility or blame be held against the
publisher for any reparation, damages, or monetary loss due to the information herein,
either directly or indirectly.

Respective authors own all copyrights not held by the publisher.

The information herein is offered for informational purposes solely, and is universal as so.
The presentation of the information is without contract or any type of guarantee assurance.

The trademarks that are used are without any consent, and the publication of the trademark
is without permission or backing by the trademark owner. All trademarks and brands
within this book are for clarifying purposes only and are the owned by the owners
themselves, not affiliated with this document.

www.TechnicalBooksPDF.com
www.TechnicalBooksPDF.com
Contents

Introduction
Chapter 1: Introduction of Raspberry Pi
Chapter 2: Raspberry Pi 101: What can I do with it?
Chapter 3: Best operating systems for Raspberry Pi
Chapter 4: Learn to program with Raspberry Pi
Chapter 5: Using Raspberry Pi in analogue world
Chapter 6: Troubleshooting Raspberry Pi
Chapter 7: Some Awesome Projects on Raspberry Pi
Conclusion

www.TechnicalBooksPDF.com
www.TechnicalBooksPDF.com
Introduction

I want to thank you and congratulate you for downloading the book, Everything You need
to Know about Raspberry Pi.
Raspberry Pi is the world’s compact computer that runs on open source Linux. Now, you
can learn using this amazing computer in Everything You need to Know about Raspberry
Pi. Whether you are an educator, hobbyist or hacker, this guide will help get your hands
on Raspberry Pi.
This book consists of 7 chapters that will help you know everything about Raspberry PI.
You will learn how to connect Raspberry Pi to other peripherals, install operating system,
learn basic programming, use this device in analogue world and create awesome projects.
The final chapters of this book contain useful information on how to troubleshoot the
device and some awesome projects to try.
Thanks again for downloading this book, I hope you enjoy it!








Chapter 1 – Introduction of Raspberry Pi



Raspberry Pi is a credit-card sized computer that can be plugged into a TV or computer
monitor. It can be said as the most inspiring electronic devices available today. Despite of
having many other computing devices such as smartphones, tablets and gaming consoles,
people are getting attracted towards these mini devices. You can play exciting games and
create stunning apps with Raspberry Pi. This little device is capable of doing amazing
things, which you would never expect from such a tiny machine. Thousands of people are
taking their first steps in computer science are getting benefited from Raspberry Pi.

In this book, you will find out everything you want to know about the Raspberry Pi. If you
want to become a computer programmer, hacker or games developer, then Raspberry Pi
will be a very good introduction to your work as well as a very powerful tool in your

www.TechnicalBooksPDF.com
adventures. This book is meant for people of all skills levels and all those who want to
know about Raspberry Pi and its applications in detail. You will discover some interesting
projects and experiments in this book and you will be surprised to see what Raspberry Pi
can help you can achieve.
So, let’s get started………………

www.TechnicalBooksPDF.com
Introduction

Raspberry Pi is a series of computers that were developed in United Kingdom by
Raspberry Foundation with the purpose of promoting basic computer knowledge in
schools. Originally, Raspberry Pi and Raspberry Pi2 were manufactured through licensed
manufacturing agreement in several board configurations with same hardware across all
the manufacturers - Egoman, RS Components and Newark Element14.

This electronic device comes with all the essential tools that are required to make your
own software. Moreover, this device is available at a very low cost to allow users to
experiment with confidence without worrying about damaging the computer. Lots of
people are discovering new ways to use it and excited about its capacity. Raspberry Pi
suits well for projects that doesn’t require large amount of processing power and will
benefit from small size.

Raspberry Pi is a powerful and easy to use tool for aspiring computer scientists and
researchers. If you want to know how computers work and learn computing skills, this is
the best starter kit you can get your hands on. Raspberry Pi projects include projects in the
topics of robotics, remote control panels, embedded projects and motion sensing camera.

The Raspberry Pi has become incredibly popular among educators, hobbyists, academics
and OEMs. It has great performance and is highly versatile, which makes it incredibly
popular among users. You have a wide choice of operating systems that can help you
tackle any projects that you take on.

www.TechnicalBooksPDF.com
Specifications

Raspberry PI is a System-on-chip (SoC) with multiple connecting ports. It can be operated
by hooking up a USB keyboard and plugging into the television. The SoC used in
Raspberry Pi was similar to the ones used in older model smartphones. Currently, there are
two versions of Raspberry Pi.
Originally, this device was based on the Broadcom BCM2835 SoC that used to have 700
MHz ARM1176JZF-S processor, RAM and VideoCore IV GPU. The performance of first
generation Raspberry Pi under this configuration was equivalent to the performance of
Pentium II processor.

The next version of Raspberry Pi was based on Broadcom BCM2836 SoC, which includes
a quad-core Cortex-A7 CPU and 1GB Ram. Its performance was 5-6 times much higher
than that of the first generation Raspberry Pi. As for specifications, the later generation
Raspberry Pi come with VideoCore IV processing unit along with either ARMv6
compatible CPU or ARMv7 quad-core CPU, 1GB RAM. The SoC includes a 32 bit
ARM1176JZFS processor that is clocked at 700 MHz and is powered by 5V micro USB
charger.

Currently, Raspberry Pi is available for purchase with features like – HDMI and
composite video outputs, 10/100 Ethernet port, 2 USB 2.0 ports, SD card slot, analogue
audio output and GPIO(General Purpose I/O Expansion Board) connector. The newer
version of firmware comes with a unique feature to choose between 5 overclock presets
that tries to give the best performance out of the SoC.

To run Raspberry Pi, you only need a few accessories. Remember, Raspberry Pi was
designed to be used with whatever accessories you have at home to minimize the cost of
getting started. Once you are done, you can do all the things you can do on a regular
computer. It is a great platform for those who want to learn programming and word
processing. There is a Pi store where you can find hundreds of applications. Download
down those apps for free by connecting to the internet and start working on interesting
projects immediately. Keep reading to find out more about how to get your hands on a
Raspberry Pi!

www.TechnicalBooksPDF.com
Chapter 2 - Raspberry Pi 101: What can I do
with it?

Raspberry Pi has become much more popular than its creators had imagined. Plenty of
people liked the idea of Raspberry Pi before using it and considered it to be one of the
most anticipated devices since its early hit in 2012. It was originally intended for students
of computer science and has become a must-have device for who are techno savvies.

Raspberry Pi does not come with an operating system but you can choose from a wide
range of operating systems based on the requirement of your project. Before you learn
about Raspberry Pi operating systems, you should know how to boot up Raspberry Pi for
the first time. You need a little set up and other accessories to get it up and running. In this
chapter, we will look at how you can set up Raspberry Pi and get your hands on it.

Below is a step-by-step guide to setup Raspberry Pi to make it ready to use.

www.TechnicalBooksPDF.com
Setting up Raspberry Pi

To get started with Raspberry Pi, you need an operating system. NOOBS is the
recommended operating system for Raspberry Pi. Before you choose an operating system,
you need a lot of other things that make it work. You should be ready with the below
devices, so that you can enjoy the complete functionality of the device.

An HDMI or composite video cable that allows you to connect your Raspberry Pi
to external monitor or television.
A television or monitor that supports HDMI or composite video.
A 4GB SD card and a card reader that does not have any compatibility issues. You
can find out which cards are compatible with the operating system by checking the
configuration.
A USB mouse and keyboard. You can even choose fully wired mouse and
keyboards, however, wireless devices works better in this case.
Ethernet cable for connecting to the network and internet. However, it is
completely optional and is not required if you don’t want to connect to other
devices.
Micro USB power supply with at least 700mA at 5V. Usually, all the smartphone
chargers supply 700mA at 5V. You can use them for charging but be sure to check
the output values printed at the bottom of your charger.
Stereo audio cable of 3-5mm is needed if you are using analogue video and want to
connect the device to external speakers.

All the above items are available anywhere and you can buy these accessories for multiple
uses.

www.TechnicalBooksPDF.com
Getting your Raspberry Pi ready for use

Once you are ready with the above accessories, here’s what to do and how to do it. You
can use your Raspberry Pi for multiple things, some of which may need special operating
system. It’s a good idea to get acquainted with your device by installing Raspbian, which
is a Raspberry focused version of Linux. Follow the below instructions to get your
Raspberry Pi starting –

Start by inserting the SD card into the slot on the device and plug in the USB
mouse along with the keyboard on the Raspberry Pi.
Turn on the monitor or TV screen and make sure that you have selected the right
input slot.
Connect the Raspberry Pi to monitor or TV screen using HDMI cable. Plug in the
Ethernet cable to the Ethernet port located next to the USB cables if you want to
connect the device to the internet.
When you finish plugging all the cables and SD card, plug in the USB power
supply to turn on the device.
If you are turning on the device for the first time, be sure to have SD card with
NOOBS (New Out of the Box Software). This is an easy operating system install
manager that is created specifically for Raspberry Pi. The best way to get NOOBS
operating system is buying an SD card with NOOBS pre-installed on it, you can
even download NOOBS from Raspberry Pi website.
You can install an operating system of your choice and configure it, once the
system turns on with NOOBS SD card. Raspberry Pi performs well on Linux-
Kernel based operating systems, and supports Raspbian, PISC OS, OpenELEC etc.
(The current release of Raspberry Pi 2 supports Ubuntu and Windows 10 IoT Core
operating system. You will find out more about Raspberry Pi operating systems in
the coming chapters. .

The Raspberry Pi will boot up and take you to the NOOBS screen. The next step is to
select an operating system and install it. Some of the operating systems available in
NOOBS are – Raspbian, Pidora, OpenELEC, OSMC, RISC OS and Arch Linux. If you
are a beginner, Raspbian is recommended. The installation will take about 20-30 minutes.
Once the files are copied, you will get a message to reboot the device. As soon as you
reboot the device, the user interface of new operating system will appear that looks similar
to Windows 98.

Now, you are ready to start experimenting with Raspberry Pi and run different programs
on it, as you do to on any desktop or laptop.

www.TechnicalBooksPDF.com

















Chapter 3 - Best Operating Systems for


Raspberry Pi

The primary reason behind not having a default operating system for the Raspberry Pi is to
allow users to choose operating system of their choice based on the requirement of their
project. You can easily run operating systems such as Raspbian, Risc OS and even
Android on your device. Remember that whatever you can choose any operating system, it
can be outdated if a new version of OS is released. You may need to re-install or update
the existing OS. If you are connected to the internet, you will get an option of
downloading the latest version. The latest version of NOOBS is v1.7.0 and was released

www.TechnicalBooksPDF.com
on 9th February 2016.

Below are some of the best operating systems for Raspberry Pi that you should know
before you start working on Raspberry Pi.

Raspbian

Raspbian is a free operating system optimized for Raspberry Pi. This Debian based
operating system is a set of basic programs that make your Raspberry Pi run. Raspbian
comes with more than 35,000 packages and provides a lot more than just an OS. This pre-
compiled software is bundled in a nice format for easy installation. The initial version of
Raspbian with more than 35,000 packages was completed in June 2012. However, it is
still under development with an emphasis on improving performance.

Raspbian was created by a small team of developers and is not affiliated with Raspberry
Foundation. It comes pre-installed with plenty of software for programming such as –
Python, Scratch, Mathematica, Sonic Pi and Java.

Arch Linux ARM

Arch Linux ARM is the distribution of Linux for ARM computers. Users will get targeted
kernel and software support for multiple instruction sets, namely – ARMv5te, hard-float
ARMv6, ARMv7 and ARMv8. Arch Linux ARM carries the philosophy of simplicity and
accommodates competent Linux users by giving complete control over the system.

The main objective of Arch Linux ARM can make it difficult for beginners in Linux as it
requires in-depth knowledge. Its lightweight base structure allows users to shape the
system per their needs. Arch Linux ARM is an inexpensive operating system for
ARMv7H ARM architecture.

OpenELEC

OpenELEC is short for Open Embedded Linux Entertainment Centre. It is built around
Kodi, an open source entertainment media hub. OpenELEC is designed to be as light as
possible in terms of complexity and size. This operating system is ideal for today’s
compact system. It uses very little system resources for processor and supports Intel HD
Graphics as well as Broadcom’s HD chip. OpenELEC also supports a broad array of
graphic cards, making it possible to convert Raspberry Pi into fully featured home theatre

www.TechnicalBooksPDF.com
systems. By using this operating system, you can build a mini device to be used as your
personal media center.

Pidora

Pidora is a Fedora-based operating system optimized for Raspberry Pi based on Brand-
new build of Fedora for ARMv6 architecture. Ideally, Raspberry Pi users have only one or
two strong operating systems to work with. If you wish to try something new, it is worth
checking out Pidora. It is slightly different than Raspbian in terms of look and feel. It
includes tons of programming languages and text editors. It features a special headless
mode to install the distribution over the network easily.

Raspbmc

Raspbmc is a full version of Linux running under the hood. The interface of Raspbmc
feels a little sluggish compared to OpenELEC. However, the video playback and music
streaming works wonderfully well out of the box with Raspbmc. You will get an advanced
settings menu to configure network, install updates, and turn off SSH services and more. It
will be more familiar to those who have experience with working under the hood of
command line.
Raspbmc is the most popular XBMC distribution for a reason – it’s easy to set up and
works out of the box very well. Raspbmc is the place to start, if you are new to Raspberry
Pi or XBMC.

Minepeon

Minepeon is an ideal operating system for mini devices like Raspberry Pi that are built
with emphasis on performance and stability. The main intention behind this OS is
‘Configure and Forget’. You should be able to install, configure and leave it to do its work
without any human interaction. It is intended as Embedded OS with emphasis on
reliability. It takes the CPU cycle away from mining and can be attached to Raspberry Pi
without dropping shares. It is user friendly, and even beginners can set up and get it
mining in less than 10 minutes.

Kali Linux
Kali Linux a Debian derived Linux distribution designed for penetration testing and digital
forensics. The aim of Kali Linux developers is to make Linux available for ARM devices.
Kali Linux has been streamlined with minimum tools. However, you can include extra
tools by installing full Meta package of Kali Linux. If you are a developer and want to

www.TechnicalBooksPDF.com
experiment with Kali Raspberry images, you can work with rpi.sh script. Before you build
Raspberry Pi image of kali Linux, you will need to set up ARM cross-compilation
environment.

OpenWrt

OpenWrt is an active home firewall project that was born on Linksys WRT54G line of
routers. It is just a Linux that is acting as a router. Obviously, Raspberry Pi can be used as
firewall with default Raspbian distribution. The main objective of OpenWrt is to provide
an easy to use firewall solution for all those who are not Linux power users. The OpenWrt
image for Raspberry Pi is still under development. However, it can be used as a powerful
operating system for little computers, which have limited resources to run full Linux
Distribution.

Raspberry Digital Signage

Raspberry Digital Signage is designed for Digital Signage installations on Raspberry Pi to
handle multimedia and web content. It is a highly secured and hack-proof operating
system for indoor and outdoor use. It displays a full-screen view of the web page, video
playlist or slideshow. This is the most powerful digital signage player software that is
currently available for Raspberry Pi.

www.TechnicalBooksPDF.com
Chapter 4 – Learn to program with
Raspberry Pi

Raspberry Pi is an inexpensive circuit board, a fully programmable PC running open
source Linux operating system. The Raspberry Pi is ideal for learning program and system
administration skills. The low cost and flexible connectivity options make it an ideal
device for children’s bedroom. Keep reading to get a whistle-stop tour of the two popular
programming languages – Python and Scratch included in Raspbian. Before that, you will
need to install one of these programming languages through Raspberry package manager.

Getting started with Python

The official programming language of Raspberry Pi is Python. It is highly flexible and
runs on almost all the platforms. Using Python, one can create interesting programs on
Windows PC or Mac and run on Raspberry Pi and vice versa. The goal of this section is to
help guide users through using Python on Raspberry Pi. You don’t need to be a
programming expert to benefit from this chapter. We will go through all the necessary
steps to get your python programs running!

The syntax of Python is very clean and uses Standard English keywords. You can start by
opening IDLE from the desktop or applications menu. IDLE gives you a REPL (Read-
Evaluate-Print-Loop) prompt, where you can enter Python commands. As it is REPL, you
will get the output commands directly on screen without using ‘Print’. You will also gain
understanding of data types and get into the data script using ‘input’ function.

There are 2 versions of Python: Python 2 and Python 3. Python 3 is the newest version and
is recommended for programming on Raspberry Pi. The python programming language
was started as script language for Linux. Python programs are similar to the scripts that
contain series of commands that a computer executes from top to bottom. The easy to read
syntax in Python allows programmers to use few lines of code. The key feature of Python
programs is that they don’t need to be compiled before running, as programmers do with
other programming languages like – C, C++ and Java. However, you need to install
Python interpreter to run these programs.

Python programs can automate the tasks like batch renaming and moving large amount of
files. Python’s REPL prompt can be used like command line to create interesting things
with Python. Programmers can create web applications, Special GUIs, small databases,

www.TechnicalBooksPDF.com
desktop applications, 2D games and many more on Raspberry Pi using Python. There are
many libraries for everything in Python – Rendering graphics, game programming, Web
frameworks, GUI, Scientific computing and applications.

Create and run a program in Python

Here, I am going to cover only the basic of writing and executing Python program. Let us
assume that you are using Raspbian on your Raspberry Pi device. You will get Python 2
and Python 3 installed on Raspbian. To install Python in another operating system, simply
run sudo apt-get install Python 3 or sudo apt-get install python. Type ‘Python’ or ‘Python
3’ (depending on the version you want to use) to access Python from command prompt.
This opens up the Python REPL screen, from which you can enter Python commands. To
exit the REPL, use ctrl-D.

Let’s start Python programming with the standard “Hello World” program. To begin, enter
sudo nano hello-world.py at command prompt and create a new file named hello-world.py.

Enter the below code and press ctrl-x to save and exit the file.

#!/usr/bin/python
print “Hello, World!”;

To run the program without making it executable, navigate to the location where the file is
saved and type python hello-world.py. If you want to make it executable, enter chmod +x
hello-world.py at command prompt. Similarly, you can work on a wide range of
complexity programs using Python on Raspberry Pi.

Getting started with Scratch

Scratch is a visual programming tool that allows you to create stunning games and
animations with drag-and-drop interfaces. You can create interactive stories, own
computer games, animations and many more using Scratch without having to write code.
It’s a great way to start programming on Raspberry Pi. Since everything is done by
dragging and dropping, you don’t need to remember commands. In this section, we will
introduce you to scratch so that you can start experimenting with it.

Create and run program on Scratch

www.TechnicalBooksPDF.com

We will make a simple drawing program that let you use the arrow keys to move around
the screen. The first thing to do is creating the code to move around the screen. You can
use scratch’s Pen Up and Pen down actions to move up and down the screen. Scratch is an
ideal language for making games. It gives you much flexibility in the type of things that
you can get your computer to do.

To access scratch, switch on the Raspberry Pi and then use Startx to access it. You can
either double-click the icon on desktop or select it from the programs menu. The scratch
screen is divided into 4 areas, where you can see your game taking shape. If you see the
screen, you will see a cat, and you can get started by making him do things.

The bottom right area is the Sprite List, who you can think of the characters in your game.
These are the images that you can make to do things like – changing their appearance,
moving them around and much more.

Start creating the scratch program by snapping the blocks together. On the left side of the
screen, you will see Blocks Palette, which include several instructions like – moving 10
steps, going to particular grid reference, rotating in particular direction and pointing in a
particular direction. The middle panel is the Scripts area, where you have to assemble your
program by dragging the blocks into it. You can use two buttons in the top right to toggle
the size of the screen. When the screen is smaller, the Scripts Area is bigger. You can drag
and drop your sprite (cat) around the stage to position it where you would like to be at.
You can even resize the sprite by clicking on the stage repeatedly.

Try different blocks and click them in the blocks palette. If the sprite goes somewhere you
don’t want it to, you can click it on stage and drag back to the place where you want. You
can do a number of things like – positioning and resizing your sprite, using directions to
move your sprite, using grid coordinates to position your sprite, changing its appearance,
using speech and thought bubbles, graphic effects, changing its visibility, adding sounds &
music and many more. If you click something that doesn’t work, you might get an error
message. There is no harm to your Raspberry Pi or scratch. Good Luck and happy
Gaming!




www.TechnicalBooksPDF.com

Chapter 5 – Using Raspberry Pi in Analogue


world

Raspberry Pi is a powerful small board computer that can be used to control digital inputs
and outputs. You can open up the world of analog signals by connecting a small analog to
digital convertor chip to the Raspberry Pi. Analog input needs special treatment in the
world of digital Raspberry Pi. I will show you what you need to do to get analog data via
USB port into your Raspberry Pi. Raspberry Pi can also be used to create Raspberry
ripple, Steve Reich Machine, build light controlled instrument or even used to make a
thermometer. This guide will show you some great options for reading analog values with
Raspberry Pi.

Create analogue sensors on Raspberry Pi using MCP3008

The main objective is to use analogue pins on Raspberry Pi, but the main problem is that
Raspberry Pi has no analog pins. Although it can send messages and receive information
from outside world, it’s a blind bat.

Raspberry Pi is purely a digital machine and you need to use Analog-to-digital converter
(ADC) to translate analog signals from sensors to something the Raspberry Pi can
understand. The MCP3008 is a 10 bit 8-channel ADC that is easy to connect and doesn’t
require additional components. It uses SPI bus protocols supported by Raspberry Pi’s
GPIO header. You can use a range of sensors using an MCP3008 device to provide 8
analog inputs. You can use a simple MCP3008 analog to digital converter to read multiple
channels of analog input to 10-bit precision. If you want to read 4 channels with 12-bit
precision, you can use the fancier ADS1x15 series.

The below experiment explains how to use MCP3008 to read temperature and light sensor.
All you need is Raspberry Pi, MCP3008 ADC, Light Dependent Resistor, 10 Kohm
resistors and TMP36 temperature sensor.

The first step is to enable the SPI interface on Raspberry Pi and install SPI python
wrapper. The pins CH0-CH7 are 8 analog inputs. Here we are using CH0 for light sensor
and CH1 for temperature sensor.

When there is a lot of light, the LDR has low resistance resulting in the output voltage

www.TechnicalBooksPDF.com
dropping towards 0V. When the LDR resistance increases, the output voltage tends to
increase towards 3.3V.

Similarly, the temperature sensor is a 3 pin device that can be powered with 3.3V. The
temperature of 25 degrees Celsius will result in an output of .750V. Each degree will result
in 10mV output voltage.

Users may note that Raspberry Pi have a hardware interface that is super fast, but not
included in all distributions. For that reason, we are using SPI implementation so that the
pins can be any of the Raspberry Pi’s GPIOs. If you want more technical information,
please take a look at Raspberry Pi tutorials at the links given below-

http://www.raspberrypitutorials.yolasite.com/
https://www.raspberrypi.org/blog/tag/tutorials/

www.TechnicalBooksPDF.com

Chapter 6 – Troubleshooting Raspberry Pi



Raspberry Pi is as satisfying and fruity as the name suggests. Many users found this little
computer to be more amazing than expected. However, there are users who has had less
than successful experiences with Raspberry Pi. There might be varying reasons for this,
but one of the main causes is the impression that the little computer can’t give. Most of
you might be thinking “what’s wrong with my device”? Sorry to tell you, but the only
thing that is wrong is you. The issues you are experiencing are more likely due to poor
power supply, incorrect cabling or problems with SD card. It is always tempting to make
short-cuts on a low-cost computer, but, if you are expecting good results, you gotta put in
the work.

Below are some common issues that can be resolved easily by restarting, replacing and
reseating the device.

Problems with SD card

The most common problem for anyone using Raspberry Pi is a corrupted SD card. This
shouldn’t be an issue if you are using SD cards designed to be written regularly, but older
SD card often get corrupted easily, leading to problems with the operating system.

For a Raspberry Pi, you should use high quality 8GB SDHC card. The storage of
Raspberry Pi is just like a high-end tablet PC and hence the SDHC format is resilient. The
card class is the other thing that determines the write speed for the card. A Class 4 card
will be able to write at 4MB/s and a Class 10 card should attain 10MB/s. For better
performance, you should consider choosing Class 10 SD card.

Besides choosing Class 10 SD card, there are a number of other ways to avoid the problem
of corrupted data. The first mistake people do is removing the SD card while Raspberry Pi
is running. As other storage devices, you should remove the SD card safely, or in this case,
when the Raspberry Pi is switched off.

Similarly, switching the device in an incorrect manner will corrupt the operating system. It
is always advisable to shut down the device by entering sudo shutdown –h now in
command line.

www.TechnicalBooksPDF.com
Poor power supply
Raspberry Pi uses a USB mains adaptor for power, which can lead to a false sense of
security, when supplying power to the device. USB ports are seen in PCs and desktop
monitors can be used to power these mini devices. However, it isn’t as simple as you think
of. Your Raspberry Pi may receive enough power from USB 2.0 port to boot, run the
processor, and power the keyboard, mouse, USB and other components, but if your
computer has insufficient power, the Raspberry Pi shuts down immediately after booting.

Also, be aware that the USB cables designed for charging smartphones may not be
suitable for Powering Raspberry Pi, even if it is connected to a main power supply. For
this reason, it is advisable to power your Raspberry Pi using suitable main power adapter.

Incorrect cabling

Keeping an eye on cabling is essential with Raspberry Pi, especially if you are using
different custom cases. Sometimes, there may be some manufacturing problems with
cables like – incorrect seating of power, HDMI Cables and Ethernet. Be aware that
cheaply available cables can lead to issues. For example – HDMI/VGA adapters available
at local stores might claim to be usable, but faults can easily arise, putting the device at
risk. Therefore, it is better if you can buy high quality cables and cases.

Image not displayed correctly

There are times that that the monitor is not recognized by the Raspberry Pi. This is the
case for old monitors that need HDMI/VGA adapters. . Since the boot partition of your SD
card is readable on a PC. The config.txt file on that partition sets up the Pi as it boots.
Uncomment the below line by removing the # fro start –

hdmi_force_unplug=1
This command tells the Pi to force output through HDMI port. Save the file and eject it
from the PC or Mac and put it back. Reboot again. If this does not work, uncomment the
below line –
Config_hdmi_boost=4
This will boost the HDMI signal and displays the image correctly.

If you are using Raspberry Pi, be sure to connect everything correctly as you do with a
desktop computer. If you are booting for the first time, you should confirm that you have
all the necessary cables, storage media and peripherals in hand. Shutting down the

www.TechnicalBooksPDF.com
Raspberry Pi is absolutely crucial and can save a lot of time re-imaging the SD card, in
case of data corruption.

Chapter 7 – Some Awesome Projects on


Raspberry Pi

The very existence of Raspberry Pi can be chalked up with creativity. Raspberry Pi
foundation created this mini PC to inspire students to learn computer science and dream
up awesome projects without breaking the bank. It’s not only experienced hobbyists who
have made excellent projects on the Raspberry Pi, but many school children have come up
with wonderful ideas. I have rounded up some of the best things that we have seen people
do with their Raspberry Pi.

· Tea-Pi

This project was designed by James Pavur that automates the process of making a nice
loose-leaf cuppa. All you need to do is just tell the Raspberry Pi for how long and what
temperature you want the tea brewed, and the Raspberry Pi will activate the connected
kettle, measures the temperature and lower the tea with the help of a servo motor. The
device will lift the tea leaves out, once they have been in for the desired time. Your lovely
cup of tea is ready!

· Multi-room music player

Buying a multi-room sound system can be a bit expensive, but thanks to ‘Jezsinglespeed’,
the developers of multi-room music player. You can now create your own music player for
under $100. This is a perfect project if you want your children to understand the power of
Raspberry Pi. All you need is wireless receivers, 1 wireless steamer and a Raspberry Pi.
You can use the Pi Musicbox software to make the magic happen.

· WhatsApp

WhatsApp has become one of the reliable cross-platform messaging services these days
with more than 600 million users. You can now send message directly from your
Raspberry Pi. All you need to do is install the updates version of Raspbian and enter a few

www.TechnicalBooksPDF.com
lines of code before registering your mobile number.

· Power Cat feeder

We all love our pets, but sometimes we find ourselves going out of the town without a pet-
sitter, just leaving a big bowl of food out. An automated pet feeder is a must-have thing
around the house, to make sure that your pet doesn’t over eat before going hungry. It can
be used to feed your pet at regular intervals.



· Talking toy

The UK based Grant Gibson tried using Raspberry Pi to improve toys in his house. He
took a chatter telephone and added Wi-Fi enabled Raspberry Pi to it. The result is a talking
chatter smartphone that let you know current weather, movies playing at local theatres,
listen to radio and do many more. The toy can even be alerted at home and let everyone
else in the home know its presence.

· Beet Box

The most peculiar project on this list is the Beet Box created by Scott Garner. It is an
interactive drum kit made of vegetables, where you can tap the vegetables to create a beat.
The capacitive touch screen sensor connects to a Raspberry Pi sends signals to the amp
inside the wooden case. With a bit of simple coding and few wires, you will be turning
your next party into a ‘Beet’ function.

· Mini Mac

John Badger, a dedicated Apple fan used his Raspberry Pi to build the world’s smallest
Mac. This Mini Mac is one-third the size of original Mac and is built to scale with off-
shelf computer components. In this project, the Raspberry Pi serves as motherboard and
uses Linux operating system. There is a support for Bluetooth, Wi-Fi, USB behind the 3.5
inch LCD display.

· Droid

www.TechnicalBooksPDF.com
Greensheller, the owner of a little droid brought it to life by using Raspberry Pi. This little
device can recognize faces, track the motion and distance. It can even follow your
commands in English and Chinese.

· Personal web server

Setting up personal web server is one of the basic things you can do with Raspberry Pi.
Although this mini device won’t be able to handle major traffic, but it will work well for
hosting a personal landing page or even a Dropbox clone.

· Home automation

You can create web app that turns the lights on and off remotely. Using this device, you
can control the power loads. All you need is a Raspberry Pi with internet connection and a
wireless remote control to turn the lights on and off.

Besides this, you can create a DSLR camera with embedded computer, use your
Raspberry Pi as a media center, make an excellent science project for school, build a
weather station, cloud server and Minecraft. If you are good at programming, you can try
building a thermal printer, handheld gaming console, Retro gaming console, Pi in the sky
and Wall Mounted calendar.

www.TechnicalBooksPDF.com
Conclusion

The Raspberry Pi, a mini PC with a Broadcom 700 Mhz BCM2835 SoC running a
lightweight remix of Fedora Linux for ARM is a powerful creation of UK-based company.
It’s a single board computer without a keyboard, monitor, mouse or even a hard drive. The
interfaces that are built into the GPIO connector make it easy to bolt on modules with the
help of low cost components and configuration, creating highly flexible and functional
systems. The inclusion of networking interfaces gives you everything you could possibly
need for creating awesome projects. If the processor is improved to run Windows directly
on Raspberry Pi, it can be a great step.

There is no doubt that Raspberry Pi is one of the revolutionary products that may change
the world in the near future. The sheer number of users and followers supports the fact that
it will have a great future ahead. Raspberry Pi can surely help anyone who really wants to
learn computer science and build some cool projects that you have never heard of. Finally,
it can be said that Raspberry works effectively, if processing power is kept in mind. I am
happy to say that Raspberry Pi is recommended to buy as soon as stock starts to appear in
channel. You get a device which has some much potential and it’s hard to imagine why
anyone interested in computer science wouldn’t buy one.

So, concludes my Guide on “Everything you need to know about Raspberry Pi”. I have
covered everything in this book from getting your hands for the first time on Raspberry Pi
to programing it in Python and Scratch and troubleshooting it. I hope that what I presented
in this book has been done in a structural way, so that you are able to learn the basics of
Raspberry Pi. Good luck in your adventures and please do comment with projects of your
own if you decide to get one!

Thank you again for downloading this book!
I hope this book was able to help you to know everything about Raspberry Pi.

www.TechnicalBooksPDF.com

Finally, if you enjoyed this book, would you be kind enough to leave a review for this
book on Amazon? It ’ d be greatly appreciated!

Click here to leave a review for this book on Amazon!

Thank you and good luck!

www.TechnicalBooksPDF.com

You might also like