Professional Documents
Culture Documents
James Fahl
Table of Contents
Introduction……………………………………………………………………………………………...
Chapter One: What Is Raspberry Pi?………………….………………….………………….
………….
Chapter Two: Uses Of Raspberry Pi………………….………………….………………….
………….
Chapter Three: Capabilities Overview………………….………………….
…………………………….
Chapter Four: Raspberry Pi Specifications And Connecting Equipment
Explanation……………………..
Chapter Five: How To Install Apps and Backup SD Card………………….………………….
…………
Chapter Six: Things To Know For First Time Pi Users………………….
………………………………..
Chapter Seven: Programming And Raspberry Pi………………….………………….
………………….
Chapter Eight: Python For Raspberry Pi………………….………………….
…………………………..
Chapter Nine: Beginners Projects For Raspberry Pi………………….
………………………………….
Conclusion………………….………………….………………….………………….
………………….
© Copyright 2017 by …… - All rights reserved.
It is not 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.
Introduction
Congratulations on downloading Raspberry Pi: Its Inception And
Innovation! If you are looking at this book, it means you are not only curious
about the Raspberry Pi and its capabilities, but are looking for basic
instructions on how to format and begin utilizing your Raspberry Pi device.
This book not only provides step-by-step coding instructions to some of the
basic ideas a Raspberry Pi owner will need, it gives suggestions for wonderful
coding languages to learn and projects to take on!
These projects found within the pages of this book will open your mind
to new possibilities you did not even believe possible, from building your own
touchscreen pad device all the way to flying your own drone! This book, along
with its contents, will provide those who are beginning as well as those who
are advanced information they can utilize as they continue to explore the world
built into their Raspberry Pi. I can promise you that once you purchase this
book and begin to read, your mind will be open to a world unbeknownst to the
average technological human being, and you will begin learning not just about
this credit-card sized device and its capabilities, but also learning about the
future of technology that will drive the next generations to come.
Do not wait one more second to purchase this book. The future of
technology has arrived. Don’t let it mow you down in its path!
Chapter One: What Is Raspberry Pi?
The Raspberry Pi is a computer the size of a credit card that plugs into a
television and keyboard. It can be used in electronics projects and houses the
capability to complete functions a computer already harbors, such as word
processing, browsing the internet, spreadsheets, and playing games. It can play
high-definition videos, and it can even aid in various individuals wanting to
learn how to make digital products and study programming.
Raspberry Pi is a conglomeration of small, single-board computers. It
was developed in the United Kingdom by the Raspberry Pi Foundation, and its
original purpose was to promote teaching computer science to students in
schools housed in developing countries. It was a way to reach untapped
individuals and broaden their horizons for how they saw their future. But, it
became greatly popular outside its intended original market, and people who
were fluent in robotics began purchasing this device. When purchasing a
Raspberry Pi, add-ons such as mice, keyboards, and cases are not included,
but you can sometimes find places where “bundle” packages are offered that
house all of these items together.
Since its inception, over 20 million have been sold, making it the single
most popular British computer to ever hit the market. Not only did it go on to
serve its intended purpose in a compact way, it served to open a completely
new market within developed countries for those who were hungry to broaden
their electronic and technical horizons, but lacked the available funds to do so.
Many different generations of Raspberry Pi have been released since its
inception, and each one becomes more popular than the last. The first
generation was released in February 2012, which soon saw the release of a
more affordable model, entitled Model A. In 2014, they released a second
generation, entitled Model B+, that had an improved board design.
These small boards became the standard for how future generations of
this product would look, and in April 2014 a computing model was released
solely for the purpose of embedded applications. Because of this model’s
popularity, Raspberry Pi Zero was released in November 2015, which was
even smaller in size and has reduced general purpose input/output capabilities.
This model was sold for a mere $5.00.
Earlier that year, however, in February 2015, Raspberry Pi 3 was
released, and this simply added more RAM (data computer storage). A year
later, in February 2016, Raspberry Pi 3 Model B was released, and this model
added on-board WiFi capabilities, USB boot capabilities, and Bluetooth
capabilities. This years two Raspberry Pi systems, released in January and
February, are the newest developments for this product and are priced
anywhere between $5.00 and $35.00.
All of these current models have many things in common: they have an
SoC (system on a chip) that houses a CPU and a graphics processing unit. They
also have an on-board memory range from 256MB to 1GB RAM as well as SD
cards that can be used to store the operating system and program memory. Both
regular and micro-sized SD cards are compatible with these latest models.
Alongside those components are USB slots, composite video and HDMI
output, and a phone jack for audio. The B-models even have ethernet port
capabilities!
The main programming languages that Raspberry Pi utilizes are Python
and Scratch (though it can support many other languages, if necessary), and the
operating systems that the original foundation provides for download are
Windows 10 IOT Core, Ubuntu, and Raspbian (which is Linux-based). The
default firmware that comes with the product when first ordered is closed
source, but an unofficial open source is available through certain outlets.
Newer versions of this firmware that is installed have the option to
choose between five different overclocking presents that have the ability to
maximize the SoC without damaging the overall lifetime of the board. What
happens is this: monitoring of the core temperature of the chip, clock speeds,
core voltage, and CPU load are all tracked within the system as the
overclocking is taking place. Then, automatic switches happen as necessary
with the chosen overclocking preset, and performance is temporarily enhanced
by as much as 1 GHz. All of this depends on the board being utilized and the
overclock preset that is activated, but overclocking at various intervals and
speeds with different Raspberry Pi models is possible, so much so that it is
written into the overall program.
The CPU chips in the first and second generation models didn’t require
cooling unless it was overclocking, but the Raspberry Pi 2 SoC requires more
cooling than usual under standard overclocking settings. Most of these devices,
however, can be overclocked all the way to 800MHz. Some can even go as
high as 1000 MHz. There are some people who have had success in
overclocking the Raspberry Pi 2 all the way to 1500 MHz, but that is while
discarding every safety feature and voltage limitations, and it is not
recommended. In the Raspbian operating system, it is possible that
overclocking can happen automatically on boot while running a specific
software command without voiding the warranty, but in these cases Pi will
automatically turn off if the chip reaches 185 °F.
Public acceptance of Raspberry Pi has been exponentially positive. Glyn
Moody, a prominent technology author, described the initial project as a
supplementation to PC compatible machines. Stephen Pritchard stated in
ITPRO something similar, and Alex Hope (co-author of the NextGen report)
said that many were hopeful that this device could open up a new world and
engage children on the excitement of programming on a level that had yet to be
reached.
Even Chris Williams wrote in The Register that he saw this overall
inclusion of children into the world of programming languages as a good start
to give kids access to learning the skills necessary for their future. The Centre
for Computing History strongly supported this idea and believed that it could
“usher in a new era” that linked kids positively to electronics on more than a
mere entertainment level.
Raspberry Pi one T3’s Innovation of the Year award in October 2012,
and Mark Pesce admitted that this device was his inspiration for the project
MooresCloud. Even the British Computer Society wanted to get in on the
action, reacting by stating that this was something they definitely wanted to
“sink their teeth into.”
Raspberry Pi hasn’t come without its downsides, however. In February
2015, a switched-mode power supply chip had a distinct vulnerability to
flashes of light. From xenon camera flashes to laser pointers, the flashes of
direct light would cause a spontaneous reboot or shutdown of the chip itself.
Many users began to speculate the possibility of the electromagnetic pulse
from the xenon flash tube causing interference by interrupting the computer’s
innate digital programming and circuitry. However, many tests ultimately ruled
that out. They found that light aimed at the other side of the Raspberry Pi
caused no issues, and set forth to looking for other explanations.
It was eventually found that the solution required the covering of the
main processing chip with a compound called Blu-Tack. It’s a poster-mounting
compound that is incredibly opaque and blocks all light from passing through
it. Light was the sole culprit and not the electromagnetic pulses, as found by
tests run once this main processing chip was covered. Now, a bare silicon
covers this chip in newer models that, when necessary, block all light from
penetrating its barrier.
Other tests performed, however, are certainly laughable. Tests with the
EMP pulses and light exposure were performed by wrapping a chip in
electrical tape, aluminum foil, and even balls of bread. The reason why this
issue was not caught before its initial release is because, while standard
practice tests issues with radio interference, it is not standard to test for optical
interference.
Raspberry Pi has undergone many transformations since its inception
with the original model a few years ago. Ironically, its intended purpose has
yet to be measured in other developing countries as its target focus has shifted
from education to implementation in robotics and the building and creation of
other computational devices. While it is still slower than the modern laptop or
desktop computer, it is a fully-functioning computer.
Chapter Two: Uses Of Raspberry Pi
There are many creative things that Raspberry Pi can be used for.
Raspberry Pi enables all basic computer functions at a much lower energy
consumption level, and it a much cheaper option for those that do not have the
funds to spend on a laptop or desktop computer. There are many practical
applications of Raspberry Pi, as well as some fun ones, all of which will be
addressed.
Practical uses for Raspberry Pi stem from what it can do in its compact
state. It can run functions such as spreadsheets and word processing programs,
as well as enable embedded and off-sight installation of applications that serve
various functions, from banking to gaming. However, the ideas many have
found where Raspberry Pi can be implemented stem beyond these basic
computer-based functions.
The good thing about Raspberry Pi is that it’s easy enough for the general
public to use given the basic technology information the average user has. One
of the purposes that has blossomed from the use of Raspberry Pi is the ability
to have a living-room multimedia experience without the bulkiness of a
computer tower. Utilizing Raspberry Pi in this fashion is easy as long as the
necessary components are in play: Raspberry Pi (obviously), an SD card, a
power adaptor, a micro USB cable, and internet connection for possible
updates. Then, you download the required software, uncompress the necessary
files, and start running the program.
Then, since the Raspberry Pi is already hooked up to the television, the
user can enact the browser on their television and have a fully-functioning
living room PC. Simply download onto Raspberry Pi the internet browser of
choice, and it will utilize the television screen as the main browsing screen.
You can even make this an entire media center, capable of playing videos,
movies, pictures, and music. The only thing necessary to make this a full-
fledged media center is the Raspberry Pi and Kodi software.
If any is a fan of retro games, then Raspberry Pi is your solution to the
craving. Raspberry Pi enables the emulating of dozens of old consoles, like the
original Nintendo, SNES, and Mega Drive. It’s not a quick install and takes
quite a toll on the Raspberry Pi to get it fully downloaded, but once it is
acquired it can open up a world of retro gaming that you can have right on your
television because you have already taken the steps to hook it up there.
However, if you are not into retro games but still want to play them with a
Raspberry Pi, have no fear: Minecraft is available for the Raspberry Pi.
Going retro even allows you to run retro operating systems. Be wary,
however: because these operating systems are completely out-of-date with
updates and firmware requirements, these systems have a tendency to freeze up
Raspberry Pi. But, it’s cool to see them in action should that be something you
want. It requires a lot of downloading, unlocking, and uncompressing files, but
it is easily possible nonetheless.
Yet another retro device it can bring back to life are the clunky USB
printers. You need a power source for each gadget as well as a USB
connection between both of the devices but, once set up, it can take that bulky
printer and transform it into a wireless network printer that anyone in the
vicinity of it can utilize.
Raspberry Pi has also founds its way heavily into robotics, and many
videos are out there that have fully-operating robotic arms and legs that are
plugged into nothing else than this credit-card sized device. This takes a full-
on knowledge of how robotics operates, but Raspberry Pi is quickly
blossoming into this category.
Of course, Raspberry Pi can be utilized for its original purpose: learning
and understanding programming languages. It is the perfect, and inexpensive,
programming platform that can enable the learning of several languages with
easy-to-use applications. Everything from downloadable applications created
as games to programs that enable the creation of completely new projects are
available to help the consumer educate themselves on several different
programming languages that Raspberry Pi can handle.
The beginnings of using Raspberry Pi to fly drone-like quadcopters is
beginning to emerge as well. Entitled RPi UAV, these drone-like figures are
being powered by Raspberry Pi, which would enable the price of drones to
plummet back down from the rafters because the introduction of an affordable
component would greatly reduce prices.
Raspberry Pi can also be utilized to create a touchscreen Pi pad, given
the right components. Many different distributors sell kits that come with all
the parts necessary to hook up the Raspberry Pi into the empty touchscreen
case, but once put together, the touch screen comes alive, powered by minimal
energy consumption in the process.
In that same respect, someone can also purchase the cheaper end of
products necessary to build a low-cost desktop computer. A keyboard, a
mouse, and an empty desktop monitor are a few of the things necessary to get
the journey started, but once Raspberry Pi is fully hooked into everything, a
functioning desktop is available for a fraction of the price.
Raspberry Pi can also be utilized to create your own cloud storage, like
Dropbox. The software ownCloud is necessary, but once you have it installed
and setup, you have access to your own private cloud storage, which is rare
nowadays. But, if you really enjoy privacy, Raspberry Pi can be utilized to set
up a VPN (virtual private network) that you can use at home or out in public.
Raspberry Pi opens up an entire world of possibilities. It is affordable
and can be implemented on many different levels, from personal cloud storage
all the way to drone function and flying. It’s small components enable a
desktop and laptop computer to be broken down into its basic components and
allows even the technologically-deficient to be able to understand the basics of
what is going on. However, its uses are also rooted in practical, every day
functions and not just the “cool” applications and interpretations.
In January 2012, the United Kingdom overall education board received
five times as much interest in the implementation of Raspberry Pi into their
educational curriculum than any other teaching software to date. Not only that,
but private schooling and education sectors were clamoring for it as well.
Their hope was that businesses would sponsor and donate money towards the
purchasing of this educational tool for implementation in less-advantaged
school system in the U.K., and the CEO of Premier Farnell has stated that many
governments of countries in the Middle East have expressed incredible interest
in providing Raspberry Pi to every single schoolgirl they have under their
wing in order to promote the advancement of women and their acquisition of
knowledge within their cultures.
The Raspberry Pi Foundation, in 2014, hired several community
members (which included ex-teachers and software developers) to create and
bring to market a bulk set of free learning resources for their main website.
The resources put up would be freely licensed under Creative Commons, and
contributions as well as collaborations would be highly encouraged on a
social coding platform entitled GitHub. They also started a teacher training
course called Picademy. It’s aim was to help educators of all shapes and sizes
prepare for teaching with this new computing curriculum that housed a
Raspberry Pi foundation within the classroom. This course was also free to
teachers.
It’s implementation education-wise has strayed away from its original
intention, but has found other modes and uses within the system of education, at
least in the U.K.
Yet another practical application exists within the developing technology
of home automation. With the rise of applications that enable someone to
control their home’s temperature while they are away in Europe comes the
question of whether Raspberry Pi has a stake in the game. And it does. Many
developers of applications are leveraging Raspberry Pi for this type of home
automation, from setting temperatures while miles away to looking in on home-
monitoring cameras. What they are trying to do is implement a cost-effective
way to bring home automation to the mass consumer market while harnessing
Raspberry Pi’s low energy consumption to also keep energy costs low after
mass home implementation. It is growing in popularity, and many have already
self-implemented the concept in their own homes.
Not only that, but the automation world has seen progress with this rising
technology as well. TECHBASE, a Polish widespread automation
manufacturer, designed the first ever industrial computer that was based solely
on Raspberry Pi Compute Mode. This device, called ModBerry, was created
in June 2014 and housed numerous different interfaces that could utilize all of
the ports, inputs, and outputs the automation industry needs in order to function.
This fully-functioning computer that could withstand the harsh environment of
industrialization officially took Raspberry Pi from a home and science project
world and integrated it into the manufacturing world
The implementation of Raspberry Pi no longer knows any boundaries, but even
the brightest of minds have to be versed in its basic component breakdown in
order to understand how it can be implemented for higher functions and
purposes.
Chapter Three: Capabilities Overview
Once the user has everything up and running, the next thing they need to
do is promptly backup their SD card. The user has put some sensitive
information on it, and if something gets compromised on the original SD card,
a copy needs to be somewhere. All of these techniques require knowledge of
the command line and terminal center of both Raspberry Pi and wherever the
user is backing it up to, so if you have limited knowledge on the subject, be
sure to follow these sets of instructions step-by-step.
One of the better ways to backup an SD card, as well as aid in the
restoration of one, is to use WIN32 Disk Imager. It can be downloaded from
SourceForge and installed, but before you start the software, the SD card has
to be inserted into the SD reader on the PC involved. Do not be alarmed about
a window popping up to show you the contents. Also, do not be alarmed at the
limited available content the file has. This is just the information the PC can
read, the rest is not readable by the PC, and that is fine.
Now, once Win32 Disk Imager is open, there is a blue folder icon to be
chosen. Click on it to choose the location of the backup, and name the backup
whatever you wish. Then, choose the drive letter for the SD card. From there,
all you do is click the “read” button, and the card will start backing up to the
PC of choice.
Then, if something happens to the original SD card and it becomes
unreadable or corrupted for any reason, simply go to the PC where the backup
is held, choose the file created in the backup process, insert the SD card into
the SD card reader slot, then click “write” to download the backup back onto
the SD card. If you do not want to use the card that has been corrupted, you can
use a completely different SD card, and it will give you the same outcome.
However, this process cannot be utilized if the user is using Mac
software. This one is a little more difficult, but it is possible. The process goes
as such:
● Insert the SD card into the SD card reader on the Mac
computer.
● Open “Terminal” and enter this command: diskutil list
○ This helps locate the SD card on the Mac operating
system.
■ Once this happens, a list of disks will pop up.
● Look for the SD card by searching for it’s name. In this
example, the SD card name is “/dev/disk1”
● Navigate back to “Terminal” and enter: sudo dd if=/dev/disk1
if=~/SDCardBackup.dmg
○ This creates a disk image (.dmg) of the SD card in the
Mac’s home directory.
■ The “/dev/disk1” is simply the card name. In this
area, enter the name of YOUR SD card.
● Then, it is time to wait. The SD card has to be completely read.
There is no time bar that pops up to count down time, so be patient
and wait until a command prompt reappears in the terminal
window.
If you use a Mac and the SD card becomes unreadable or corrupted,
simply follow the steps outlined above to find the copy. But, before the writing
process can occur onto the SD card, there is a process called “unmounting”
that has to occur. Simply put, this process disables the operating system from
writing the copy the same time the SD card is.
The following process works as such:
● Insert the SD card into the card reader.
● Open the terminal and enter: diskutil unmountDisk /dev/disk1
○ Again, replace “/dev/disk1” with whatever card name is
chosen for your SD card.
● Then, use this command line of code to write the image back to
the chosen SD card: sudo dd if=~/SDCardBackup/dmg
if=/dev/disk1
○ Once again, replace “/dev/disk1” with whatever the
name of the current SD card be utilized is.
● Once the copying has finished, remove it using this command
line: sudo diskutil eject /dev/rdisk3
Once the user comfortably has a backup or two of their SD card, the next
thing is all about fun: installing applications onto the Raspberry Pi.
There are several different ways to download applications, and the most
popular way is via the Raspberry App Store that the Raspberry Foundation
created. In order to get this, the Raspberry Pi has to be utilized in the way it
was intended for: the user has to broaden their knowledge of how command
lines work within their own product they have purchased.
● Open the command line with your Raspberry Pi and enter this:
sudo apt-get update && sudo apt-get instal pistore
● Once installed, a new icon not present before will be seen on
the main desktop of Raspberry Pi. Double-click it in order to open
it and it will be set up similarly to many other application stores.
From here, the user can search and download applications onto
their Raspberry Pi, as well as find screenshots and basic
information about applications available to them.
○ Only one application at a time can be installed, so make
sure to carve out time in your schedule if you want to
download multiple applications onto the Raspberry Pi.
The only issue many have with the Raspberry Pi App store the
Foundation created is the fact that this store houses only a fraction of what is
truly available for the Raspberry Pi. This is why there are other methods to
obtain applications, or “packages.”
Another way to download applications to the Raspberry Pi goes as such:
● Log into the Raspberry Pi, but do not fully enter the desktop
environment.
○ If you are already in the desktop environment, simply
double-click on the LXTerminal icon present in order to
open what is called a “shell session.”
● First, the repository has to be updated. So, enter this command:
sudo apt-get update
● This apt cache houses a large index of every single software
package available, and it is searchable to find what you want. In
order to narrow down the search by genre, simply use this
command line: sudo apt-cache search game | less
○ Replace “game” with any genre of application you wish
to search.
● Then, find a package you want to install. Each line has the
official name of the package, then a hyphen, and after that hyphen
is a brief description of the package and what it contains.
○ You can use the up and down cursor keys in order to
move through the vast list of files, and when you are done
browsing, Press the Q key.
● When you are ready to install, enter this command line: sudo
apt-get install penguinspuzzle
○ The last part, “penguinspuzzle” is a filler for the words
that will be before the hyphen of the requested file. For
example, if a file is named “titletitletitle -
allthethingsimaginable”, then replace “penguinspuzzle” with
“titletitletitle”
● Wait for the installation process to complete, and the
application is yours!
Yet another way to install applications is to download another user
interface called Synaptic.
● Make sure you are in Desktop mode on the Raspberry Pi. If it is
not started for whatever reason, enter startx in the terminal
window
● Open the terminal window and enter this command line: sudo
apt-get install synaptic
● Answer “yes” to all of the questions that will be prompted
during the installation process
● Once installed, Synaptic will be located in the Preferences
menu on the desktop
● When it is clicked on from the Preferences menu, you will be
prompted to enter a password for the root username “pi”. The
default password is “raspberry”.
● Now, a list of application packages will pop up, but it needs to
be updated to the latest ones. To do this, press “CTRL” and “R” at
the same time.
○ This will take a while once the reload begins, so be
patient.
● Once reloaded, the packages will be split into their assigned
sections that can be searched through in order to find what you
want to install,
● When ready to begin installing, simply click on a package and
select the button that says “Mark for Installation.”
○ Make sure to keep an eye out for any dependency
packages that might be required. These are packages that are
required in order to run the one you are selecting, so make
sure that if the package has any, to click on “Mark” beside
each of them so they will download as well.
● Once you have all of the selected application packages you
want to install, click the “Apply” button at the top of the program.
○ This will prompt a succinct summary of what you have
chosen to install.
● Click on “Apply” once again, and the packages will begin
downloading.
Some suggested packages in order to help the Raspberry Pi become
more like a laptop or desktop computer are gimp (a photoshop-esque photo
package manipulation program), chromium (the Chrome browser), calibre (a
library manager as well as an eBook converter), and libreoffice (a suite sort of
like Microsoft Word that houses a spreadsheet application, presentation
package, and word processor).
The Raspberry Pi was made to teach, so if the user has a lack of
knowledge on command lines and terminal windows, then this is a great way to
become familiar with them. As the Raspberry Pi is navigated, more innate
knowledge of the system will become easier to understand and navigate. Do
not let this deter you. Just take the steps slow, and research on a desktop
computer or laptop when necessary. The Raspberry Pi was created to educate.
Let it do what it was meant to do while harnessing the power of the Raspberry
Pi.
Chapter Six: Things To Know For First Time Pi Users