Raspberry Pi 4 For Everyone An Advanced Guide For Starters Intermediates and Experts To Become A
Raspberry Pi 4 For Everyone An Advanced Guide For Starters Intermediates and Experts To Become A
Introduction
W hen you hear the word Raspberry Pi 4, what comes to mind may be a
fruit, especially for those who are not conversant with what it is. They
might think, oh wow it is something edible and because it sounds like some
fruit in the class of strawberry. It wouldn't be a surprise if one would think
like that after hearing the word raspberry, it is like a sixth sense or
something.
Now, this is different for tech guys, those who are more inclined to things
that concern technology. These just get the information when the word
Raspberry Pi 4 is mentioned, they easily understand what has been said and
you might be surprised at how much they know. Now the word might be
confusing to those who aren't techy, so if there was a debate about what it
is, we might have a war as most people might argue strongly from their
point of view about it being a fruit or something understandable, come to
think of it, who names a software after food.
Now to avoid arguments that may occur as raspberry being a fruit and not,
this book will shed more light on what raspberry pi4 is to those who do not
grasp the idea of what it is, so they have an understanding of what it is. To
those who are familiar with it but do not know how to use it or go about it,
this book will be a guide on how to use the raspberry pi 4 and help clarify a
lot of confusion, so it is more like a how-to book.
To fully grasp what Raspberry Pi 4 is about, we would have to start from
somewhere, the basics. We would have a look at what Raspberry Pi is, how
it began, and how it works. This is the first step to understanding what it is.
We would also take a look at a whole lot of things and trust it to be fun. Sit
back, relax as you not only enjoy but also buy, learn, and add more
information to your knowledge bank. Now before we go into all of what
raspberry pi is let us take a peek at what it is and where the use of raspberry
started.
The first attitude to learning is showing interest in whatever it is one has
resolved in his or her heart to learn right. It is not enough to say you want to
learn about something and not show it, you might get the teacher confused.
On the other hand, to know that you are interested in something is in the
questions you ask, you want to know the "what, How, when, why, and
where" These are questions that spark up curiosity which leads to research
and yields results.
What is Raspberry Pi?
Starting with the "what" Raspberry Pi is a low-cost computer that looks like
the size of a credit card, which is plugged into the computer monitor or
television and uses a standard keyboard and mouse. It is a little device that
is capable of enabling people of all ages to explore computing, and also
learn how to program in languages such as scratch and python.
image1
The raspberry pi launched in 2012 and there have been several versions
released since then. The original pi had a single-core 700 MHz CPU and
just 256MB RAM, and the latest model has a quad-core 1,4GHz CPU with
1GB RAM. Now the main price for Raspberry Pi has always been $35 or
less including the Pi Zero which costs $5.
All over the world, the use of Raspberry Pi is versatile, it is used to learn
programming skills, build hardware projects, do home automation, and
even use them in industrial applications. The Raspberry Pi is a very cheap
computer that runs Linux but also provides a set of GPIO ( general purpose
input/output) pins that allow you to control electronic components for
physical computing and explore the internet of things(IoT). Now let's take a
look at where it all began, shall we?
History
It has been said that if you want to lead a better future, you will have to go
back to the past, see how it started that way you would be able to figure out
the future. Now we are going to be taking a look at where the use of
raspberry pi began, you know what they say; you can never go wrong with
history.
The first thing you might want to know is that Raspberry Pi is the name of a
series of small single-board computers made by the United Kingdom by the
raspberry pi foundation in association with Broadcom. Now early on the
raspberry pi project moved towards the promoting of teaching basic
computer science in schools and developing countries and later the original
model became far more popular than expected, selling outside its target
market for uses such as robotics, Now it is widely used in diverse areas
such as weather monitoring, this is because of its low cost, modularity, and
open design.
In 2006, early concepts of the Raspberry Pi were founded on the Atmel
ATmega644 microcontroller. Its schematics and PCB layout are publicly
available. Now Foundation trustee Eben Upton gathered together a group of
teachers and academics and computer enthusiasts to devise a computer to
inspire children. The computer is inspired by Acorn''s BBC Micro of 1981.
The Model A, and Model B and Model B+ names refer to the original
models of the British Educational BBC Microcomputer developed by Acorn
Computers. the ARM version of the computer was the prototype that was
mounted in a package the same size as a USB memory stick, it had a USB
port on one end and an HDMI port on the other end.
Now the foundation's goal was to offer two versions, which were priced at
US$25 and $35, They began to accept orders for the higher-priced Model A
in February 2012, the lower-cost Model A and February 2013, and the
lower cost at $20 A+ on November 10, 2014. On November 26, 2015, the
cheapest Raspberry Pi yet, the Ras[berry Pi zero was launched at $5. Now
according to Upton, the Raspberry Pi was chosen with Raspberry as an ode
to a tradition of naming early computer companies after fruit and Pi as a
reference to the python programming language.
When the second board type was released the raspberry pi foundation set up
a new entity which was named raspberry pi trading, and also installed Eben
Upton as CEO, with the responsibility of developing technology. The
foundation was then rededicated to as an educational charity for promoting
the teaching of basic computer science in schools and countries that are
being developed.
You might want to know that the Raspberry Pi is the bestselling, if not one
of the best-selling British computers. More than 30 million boards have
been sold as of December 2019. Most Pis are made in a Sony factory In
Pencoed, Wales, and the others are made in China and Japan.
Let us take a look at some of the generations of Raspberry Pi that have been
released before now. The models feature a Broadcom system on a
chip(SoC) with an integrated ARM compatible central processing
unit(GPU). However, the first generation (Raspberry Pi Model B) was
released in the year 2012 as mentioned before in February, which was
followed by the simpler and cheaper Model A.
Then in 2014, the foundation released a board with a revamped design,
Raspberry Pi Model B+. Now, these first-generation boards feature the
ARM11 processors, they are approximately credit-card sized and represent
the standard mainline form factor. Revamped A+ and B+ models were
released a year later. A computer module was released in April 2014 for the
applications that had already been embedded.
We now look at the Raspberry Pi 2 which was released in February 2015
and featured a 900 MHz 32-bit quad-core ARM Cortex-A7 processor with 1
GiB RAM initially, but later versions featured a 1.2GHz 64-bit quad-core
ARM Cortex-A53 processor.
A Raspberry Pi Zero was released in November 2015 for $5 with a smaller
size and reduced input/output capabilities. On the 28 of February 2017, the
Raspberry Pi Zero WH was launched, a version of the Zero W with pre-
soldered GPIO headers.
image2
The Raspberry Pi 3 Model B was released in February 2016 with a 1.2 GHz
64-bit quad-core ARM Cortex-A53 processor, onboard 802.11n Wi-Fi,
Bluetooth, and USB booth capabilities. Raspberry Pi 3 Model B+ was
launched with a faster 1.4 GHz processor and three times faster gigabit
Ethernet on Pi day 2018. Now other features are power over Ethernet, USB
boot, and network boot.
image3
In June 2019 Raspberry Pi 4 Model B was released with a 1.5 GHz 64-bit
quad-core ARM Cortex-A72 processor onboard 802.11ac WiFi, Bluetooth
5, full gigabit Ethernet, two USB 2.0 ports, two USB 3.0 ports, and dual
monitor support via a pair of micro HDMI ports for up to 4K resolution.
The Pi also is powered by a USB-C port, which enables the provision of
additional power downstream peripherals, when used with an appropriate
PSU. Although the initial Raspberry Pi 4 board has a flaw in its design
where third party e-marked USB cables, such as those used on Apple
MacBooks, incorrectly identify it and refuse to provide power.
image4
Hardware Configuration
Now since we have been able to see what a Raspberry Pi is, let us take a
look at how to configure its hardware. Now configuring the Raspberry Pi
hardware, really isn't going to take much time. First, you have to know that
the Raspberry Pi is a great thing, it is a real computer and is also cheap. It
can interface with electronics, talk to the web, and has full HDMI support.
Nevertheless, it runs on Linux, and in others for you to be able to configure
the Raspberry Pi hardware; you are going to have to follow some
instructions.
Now what these instructions help you do is set up a wireless Raspberry Pi
that allows you SSH into the terminal window on the Mac, it will also allow
you to run wirelessly without a static IP for each card.
It will also automatically startup, no login, set your time zone, and allow
you to perform many more things. Below are steps that should be taken to
be able to configure the Raspberry Pi.
Gather Materials
Now to achieve the goal of configuring the Raspberry Pi, some materials
are going to be needed and they are;
● The Raspberry Pi itself
● A power supply with a micro USB cable to power the Pi, if it is
possible to get a 2A one, it will be very useful
● A 4GB SD card is needed for most cases, you would not need anything
larger.
● A USB wifi dongle. You can find a lot of these that are Pi compatible
on the market.
● An Ethernet cable to go into your home router
● HDMI monitor with an HDMI cable, a cable, and some sort of
Ethernet router that lets you plug an ethernet cable, directly into the
back of it.
Download Raspbian
This here is the recommended Linux kernel to install unless you require a
special Linux.
Initialize SD Card Using Disk Utility
Most times people assume that, before one can utilize their SD card they
have to get a specific card with a specific name.
What they do not know is that they can use Disk Utility to initialize their
SD card irrespective of what the name of the card is and what matters most
is that the format is MS-DOS(FAT). Then format the SD card.
All you have to do now is put the SD card in your Raspberry Pi, connect the
keyboard to your HDMI monitor, and then plug in the USB power. Leave
the wireless USB dongle disconnected. You will then see a black screen
with a bunch of text, which shows different types of configuration details
that you do not need to worry about.
Now you want to get a Raspberry Pi configuration screen. Some versions of
Raspbian will automatically load this screen. Now if you don't see this
screen and you have to log in, you can still get to the command line by
typing in:
Sudoraspi-config
After you log in, you will see the configuration screen for the first time. the
options are and the exact configuration on screen may be a little different
from this instructable, as the Raspbian builds change overtime.
The options are:
Expand File system: You do not have to do this, even though some might
disagree on this.
Change User Password: It is recommended to change this, using the
default password can cause a security concern.
Enable Boot to Desktop/scratch: Now by default, this is set to console,
which is what we want to keep.
Internationalization Options: Set up your time zone.
Enable Camera: you can always change this later, you do not necessarily
need to do it immediately.
Add to Rastrack: no you do not have to.
Overclock: now this is entirely up to you.
Advanced options: choosing A4 SSH, will enable you to secure shell
access, which means you can control your Raspberry Pi from a remote
computer.
Choose Finish and Reboot: When you get a prompt, enter:
Sudonano /etc/default/keyboard
Change XKBLAYOUT to ="us" assuming you are in the United States, but
you can also set this to whatever the keyboard code for your country might
be. Nano is simply an in-built editor. Type in ctrl-X and Y and then
overwrite to save the file.
You can make these keyboard changes take effect by rebooting, do this by
typing in this command:
Sudo reboot
Setting Up Auto-Login
Here your Raspberry Pi will be without a keyboard and a monitor and only
accessible by SSH.
For Older Installations
● After the reboot, at the command line you will enter:
Sudonano /etc/inittab
● Now all you have to do is scroll down to the line:
1:2345:respawn:/sbin/getty 115200tty1 and comment it out by putting a '#'
in front of it, such as:
#1:2345:respawn:sbin/getty 115200tty1. Now you do not have to worry if
the 115200 reads as 38400 or anything like that, what we are going to be
looking for is the 1:2345 line.
● Next, you add the line, beneath it:
1:2345:respawn:/bin/login-f pi tty1/dev/tty1 2>&1. You have to be
extremely careful to get the exact spaces right.
● Sudo reboot and the Pi, should automatically login.
For newer installations
● You can set up auto-login through the raspi-config screen
Sudoraspi-config
● Choose (3) Boot Options
● Choose (B1) Desktop/CLU
● Choose (B2) Console Auto Login
● Choose and reboot.
Download an IP Scanner Package
There are ways to get your Raspberry Pi ethernet address, you can get it
through using commands like ipconfig and hook the Pi directly to a
monitor. This technique also bypasses the lugging of the monitor around the
room. You can use IP scanning software to identify the local IP address of
your Raspberry pi
Determine The IP Address and SSH Into It
To determine the IP address, you will have to connect the hard Ethernet jack
from the router to your computer and plug in the Raspberry Pi. So in a case
like this, the Pi has been assigned to 10.0.1.25, as you will see on the
scanner. Make sure to scan in the range of 10.0.1.0.1.255 using the scanner.
now mind you, what we want to achieve is to log into it by ssh and finish
configuring it for a static and wireless IP address. So you have to open the
terminal and type in
Ssh [email protected]
Run Package Updates
This will be the next step, this is how you will go about running updates for
your packages:
● On the command line, type in:
Sudo apt-get update
● Then type in
Sudo apt-get upgrade
What both of these commands will help you do is this; it will give you a lot
of gobbledygook and you will have to exercise patience for a little while.
These update packages lists from various repositories and updates, To get
information from them on the newest version of packages and what they
depend on.
● When you are done, Sudo reboot.
Clone The SD Card
Now the catch here is that this step is not necessary, it is optional and it can
only be used if you are making more than one Raspberry Pi SD card. This
will help save time or you can choose to over to the next steps on IP
configuration
However, what we have is a Raspberry Pi set up which works fully, with
auto-login custom passwords, keyboard settings, and correct time zone.
What we are going to be achieving is to clone the setup to bypass the stress
of going through the setup for each SD card, auto-login, time zone, updates,
and more.
Now since the static IP addresses wired and WiFi are both outstanding on
their own for each card, what happens is that we will just add these
individually. You will now remove the sd card from your Pi putting it back
into your Mac. However, you launch terminal and type in:
diskutil list
Alright, you may probably be wondering why you have seen this before and
it is appearing before you again or you may ask if it all is the same. Now
the thing is, yes you have seen this before but the catch is, there is a slight
difference. So you see it is not entirely the same.
The slight difference there is can be found In the partition name of the SD
card. What happens is that we don't convert to the raw device name, all you
just have to do is just use/dev
/disk1
Next, you type in the dd command, like this:
sudodd if=/dev/disk1 of=~/ Desk
What this would do for you is to copy the SD card image onto your desktop
Assigning a Static IP
At this point, because you still don't have your wireless USB adapter
plugged in. Now what we want is a static IP assigned for every card. Now if
we want to go theoretically, you could have two Raspberry Pis and have ten
SD cards, the IP settings will be stored on the SD card itself. Then you put
the SD card back in your Raspberry Pi and connect it with the Ethernet
cable to your router, leaving the dongle disconnected.
You can also use the ssh to get back to logging into your Raspberry Pi, that
is; Ssh @10.0.1.25, or it could be whatever your IP scanner shows.
Then type in:
Sudonano /etc/network/interface
You want to replace the line: iface eth0 inetdhcp with: iface eth0 inet static,
and then specify the address, netmask, network, broadcast, and gateway,
just like the one below
Iface eth0 inet staticaddress10.0.1.64
Netmask 255.255.255.0
Network10.0.1.0
Broadcast 10.0.1.255
Gateway 10.0.1.1
Now you don't have to worry about what it is you are doing okay. what you
are simply doing is instead of using DHCP, which dynamically assigns IP
addresses, it assigns a static one, in this case, it is 10..0.1.64.
Chapter Two
You can connect your keyboard, mouse, monitor screen if you have an
Ethernet cable and also insert the SD card into the SD card slot. Now it is
recommended to connect all the peripherals before powering up the
raspberry pi. One thing you have to understand is that all these peripherals
are optional according to how the owner uses them.
You probably might think all these are too complex and you can't
understand all of them, hold on. Take a deep breath and try not to rush it,
calm down, and take it slowly, paying attention to details. Let's continue,
another thing you need to know is the power supply of 5 volts 3 Amps as a
micro SD card is mandatory to start the Raspberry Pi.
Micro SD Card
What you have to do next after booting your micro SD card with the
operating system, all you need to do is insert the micro SD card slot into the
SD card slot which is on the back of the Raspberry Pi board.
Micro HDMI to HDMI Cable
For this, a PC display or any other monitor screens can be used to connect
with the Raspberry Pi, and all it only needs to have is an HDMI port for the
connection, which enables you to connect two screens at once. Raspberry Pi
also supports 4k video output which can be configured in the Raspberry Pi
configuration.
image7
Keyboard
Mouse
Ethernet Cable
Just like your PC or laptop. You should know that Raspberry Pi also has the
feature to connect to the network using an Ethernet cable. If you look
closely at the image below, you would notice that there is an Ethernet port
highlighted in the image, where you are allowed to insert an Ethernet cable
and give Pi access to the Internet.
image10
You can also use WiFi for that, all you need to do is to add your SSID and
password settings. Now you need to use an Ethernet cable if you want to
connect it to VNC for the first set up. An important thing to note is that
without the Ethernet you cannot get the IP of your Pi which is very vital
when connecting to VNC.
This is worthy of note, give power supply only to the Pi, after connecting
all the devices.
Headers
One of the important, as well as one of the most interesting features which
Pi offers the user is the GPIO pins. Temperature sensors, IR sensors,
Ultrasonic sensors, Rays, and many more, are all external devices that can
be interfaced with the Pi which is not possible in a personal computer.
image11
After you are done with your connections, the next thing you do is plug In
the power supply. Now a 15.3W type C power supply is needed for the
Raspberry Pi 4. It provides stable 5.1v 3A power to the Pi. It also has an
operating input voltage range of 96-264Vac.
All you now have to do is Insert your type C power supply into the type
power slot that is highlighted below. Also once connected you will see a red
power led glowing. Now if your Raspberry Pi is booting you see a green
LED blinking. If there is any power issue the red light will also blink.
image12
The picture above is the Raspberry Pi desktop look when it is put on for the
first time. It will ask you to set up a few things like setting the location,
time, and more. After all the settings are done, you will find out that you are
ready to use Pi.
Chapter Three
How To Set Up NOOBS on Linux, Windows, Mac and Install
Raspbian OS
Now the question is, how do you install NOOBS on the Raspberry Pi. The
good thing about this is its simplicity when it comes to installing it on your
Raspberry Pi. You want to find out how you can install NOOBS without
any stress, the steps are as follows
Get The Needed Materials
The materials you will need to install NOOBS are:
● A computer with an SD card slot
● An SD or micro SD card of about 8G
● Download NOOBS and Extract it: your computer will be used to put
NOOBS on an SD card, and the first step you are going to take is to get
NOOBS on your computer
Format The SD Card
This right here might be what you want to do, insert your SD card to the
corresponding slot on your computer. Then you are going to format it as
FAT and there are several ways to pull this off. now on a Mac or Windows,
all you need to do is use the SD Association Formatting Tool (FAT). You
have to make sure the " Format size adjustment" option is set to "on", after
you have done that, you erase it in FAT.
Put The NOOBS Files on The SD Card
All you have to do here is to drag and drop the NOOBS files into your
formatted SD card, because the file is what you need and your zip extracted
to a folder, all you need do is to open that folder up and select what you
want only
Since we have taken a look at what a Raspberry pi is and have also seen
how to configure its hardware, learned how to set it up, and more. We will
now move forward into learning how it works, it would be of no use to buy
a plane and not know how it cost. Okay, you might be thinking well, that is
why there is a pilot, hold on. The question you should be asking is, what if
something happens to the pilot and is unavailable, what would you do?
Now what you have done learning what Raspberry Pi is, and also learned
how to configure it, don't you think that is progress, so why stop there when
you can learn to navigate the entire system like a pro and so I will be your
pilot, sit back relax and enjoy the flight. Let's begin.
What you will learn in this chapter is how you can navigate your Raspberry
using the command-line interface, you might be thinking, there are a lot of
command lines, and yes you are right. The next thing you will have to do is
create folders, move from one directory to another.
Now because there are some key terms and concepts that surround the
Raspberry Pi, we will need to start identifying and defining them. Here are
some steps you should take:
Get Conversant With The Linux
Over the cause of going through this book, you might have noticed that a
few times "Linux" is mentioned. You might be wondering what Linux is,
not to worry you would find out soon. Now before we go into what Linux is
let us see how it relates to the Raspberry Pi. At the core of the Raspberry Pi
is its operating system which in this case is Raspbian.
Raspbian is a free operating system that is built on Debian optimized for the
Raspberry Pi hardware. It is also hinged on another piece of software, the
Linux kernel and this makes the Debian a Linux distribution, which is also
known as a Linux distro.
With all that explained, we will now take a look at what is Linux. First
Linux was created by a man named Linux Torvald and it was revealed to
the world in 1991. Even though it is mostly referred to as an OS, Linux is
the essence of the OS. The one thing that is amazing about Linux is that it is
open-source, which means that all the code is available to download, use,
and alter if you choose to. It is free to download and use as well as any
Linux distros made, such as Raspbian.
What is an Operating System?
Getting around the Raspberry Pi software can only be done in two ways:
Desktop Environment
This is known as a GUI( Graphical User interface). This right here is what
you have been using on your personal computer when you open windows,
drag and drop items, create new folders, and all of the things that you do.
The idea of the desktop environment was to provide that sense of an actual
office desk with a notepad, calculator, and folders to file written documents.
Linux Shell
Now the shell is a program known as a CLI (Command Line Interface)
because it has to take keyboard commands and pass them to the operating
system to be carried out.
Using The Desktop Environment
Now you might have come across the fact that Raspberry Pi 3 does not have
an 'off' and 'on' switch. The question you might want to ask is how do I shut
off the Raspberry Pi? Now, this is a smart question, it simply shows that
you are observant.
If you pull the power plug while the Raspberry is still running, the data on
the SD card will be corrupted, so you should not do that. Instead, the best
way to do that is to shut it down through the software, and to that, you have
to go to the menu in the upper left corner and click shutdown.
Shutdown
When you shut down your Raspberry Pi in this way, you are safely stopping
all the processes. You might also want to wait for a minute after shutting it
down to remove the power supply, that way it is safer.
Reboot
When you choose the option of rebooting, you safely restart the Raspberry
Pi. This sometimes is important after installing software and configuring the
Raspberry Pi.
Logout
The fun thing about the Raspberry Pi is its ability to carry more than one
user in addition to the default Pi user, and the option to log out the current
user.
Accessing File Manager
The file manager is Raspbians application for accessing and managing the
Raspberry Pi's file, which comprises directories and files. You want to be
able to access it by clicking on the file cabinet icon in the taskbar. It can
also be found under Menu Accessories File Manager.
Using The Command Line Interface
It is referred to as the terminal or the console. You should also know that
the default terminal application in Raspbian is called LXTerminal. This is
another program that allows you to interact with the shell. Technically it is
known as a "terminal emulator" because it emulates the old style video
terminals. Let us get started. Press the keys
Ctrl+Alt+t
You also have an option of going to click on the computer icon with the
black screen in the upper left corner. There a terminal window will pop up
with a line of characters that is not long and a cursor.
This is called a command-line prompt. Now that line of characters are
formed from left to right, they are the USERNAME which is the name of
the current user signed into the Pi, HOSTNAME is the name of the Pi,
PATH is where the user operates from on the computer, it is also known as
the current working trajectory and SYMBOL indicates what kind of user
the current operator is, take a look at these symbols "$" indicates normal
user"#" indicates root user.
Chapter Five
How To Work With Raspberry Pis Remote Connection
(Through VNC and SSH)
N ow to use the VNC, you are going to need two programs. The first
thing you will need is the VNC Server on the computer you want to control.
However, you will need a VNC viewer on the device you want to control.
The good thing about this is that Raspbian comes pre-loaded with VNC
connect, RealVNC's remote access software. It consists of a VNC Viewer.
Let us take a look at how we can work with Raspberry.
There are basically two methods used when you want to enable VNC:
● Using the GUI
● Using Terminal
Using the GUI
Go to where you see preferences > Raspberry Pi Configuration and then
click on interfaces. When you are there, select VNC: Enabled
Using Terminal
What you do here is open Terminal and type in this command
sudoraspi-config
Next, you go to Advanced Options and select VNC, then you will be asked
by the config if you word like the VNC server to be enabled, then you
select "yes" and to exit you select "finish"
Connecting to your Raspberry Pi using VNC viewer
Now, there are two ways to set up your Raspberry Pi using a VNC viewer.
You can use it through a direct connection or a cloud connection.
Setting Up your Raspberry Pi Using Direct Connection
You have to know that direct connections are very straightforward, and if
you are going to connect your Raspberry Pi from your home network
options you will have to follow some steps.
Open a Terminal and type in this command
hostname-1
The terminal will send you back your private IP address
Install VNC viewer on the device you are going to use to control your
Raspberry Pi
After that, you enter your private IPaddress into the VNC viewer.
The VNC viewer will then ask you to authenticate with your Raspberry Pi
username name and password. Now if you did not change your password,
your default username and password will appear.
Setting Up a Cloud Connection
Using a cloud connection to connect to your Raspberry Pi is a very
comfortable way to do so, that way you would not have to configure your
router or have to know your IP address before connecting. So if you are
going to connect your Raspberry Pi from your home network options, that
really would be a good choice and reliable also.
This is how you set up a cloud connection to your Pi from your home, for
those of you who do not know how to do so.
● The first thing you have to do is to sign up for a RealVNC account
● Then you sign in with your new RealVNC account on your Raspberry
Pi
● When the next screen appears, select "Direct and Cloud connectivity
● Then you download and install VNC viewer on the device you want to
use in controlling your Raspberry Pi.
● After that, you sign in to the VNC viewer using the RealVNC account
as you did before.
● Then click on the icon for Raspberry Pi.
Note that the VNC server will ask you to authenticate With your Raspberry
Pi username and password like the direct connection did. Now let's mine on
to creating a virtual desktop.
Creating a Virtual Desktop
U sing APT from Debian is the easiest and fastest way to manage to
install, upgrade, and remove software. Now you may be asking what APT
stands for. It stands for Advanced Packaging Tool. A piece of software
packaged in Debian and works on the Raspberry Pi's ARM architecture
should be available in Raspberry Pi's OS.
If you want to install or remove packages, you will need user permissions to
be in "sudoers" or you must be logged in as "root". To also install new
packages or even update existing ones, you need to have an internet
connection. You also have to take note that installing software uses up disk
space on your SD card, so you might want to keep your eyes on the disk
usage and use the right sized SD card. You also can not install multiple
packages at the same time, while a lock is performed when the software is
installing.
Software Sources
Remove
This way you can uninstall a package with apt remove, type the command
in the command line:
sudo apt remove tree
After this, the user will be asked to confirm the removal, and then again the
'Y' flag will auto-confirm.
Purge
This right here allows you to choose to completely remove the package and
its associated configuration files with apt purge
Upgrading Existing Software
Now you can get updates with sudo apt update if software updates are
available and install the updates with sudo apt full-upgrade, which will
upgrade all of the packages. If you also want to upgrade a particular
package, without upgrading every other outdated package, you can use sudo
apt to install some package.
Searching for Software
You can also check for a package in archives using a given keyword with
the apt-cache show. You can also view more information about a package
before installing it with an apt-cache show.
Chapter Seven
Setting Up the Programming Environments on Your Raspberry
Pi by Installing Python or C++
Configuring Your Pi
image14
To open a terminal, click on the terminal icon on the top left of the desktop.
You will be sent a command prompt immediately in the terminal window.
Headless
When it comes to a headless setup, everything you do is terminal, and when
you connect to your Pi through SSH, you will be sent a login prompt on the
terminal. Then you will enter the default credentials.
User name: Pi
Password: Raspberry
image15
This is how you will go about running the configuration tool on your
Raspberry Pi;
● Now from your command prompt enter the command:
sudoraspi - config
● However, if you are asked to enter a password, just type out the default
password raspberry. You will then be given several points on how to
configure your Raspberry Pi.
image16
● Use the arrow key 1 to change your user password, then follow the on-
screen prompts to change your default password.
image17
image18
Chapter Eight
How To Troubleshoot Common Issues on Your Device
This is one of the many issues one might experience with their device.
When this error occurs the Raspberry Pi's boot process becomes stuck on
the splash screen and mist people usually do not know what to do, then they
begin to panic.
The solution to this kind of problem is solved by formatting the SD card
and ensuring the correct noon files are copied to it. You can try the card on
another Raspbian Pi or use another card if it doesn't work.
Unable to Access the Pi Over SSH
If you are having trouble accessing the pi over ssh, all you have to do
activate communication over SSH under the raspberry pi's settings, with the
PI connected to the monitor, all you have to do is go to preferences and then
select Raspberry Pi configuration, and when the configuration window
opens, select the radio button labeled ENABLED in front of the SSH.
image19
image20
A fter learning about the Raspberry Pi and what it is about, let us now
look at how we can use it. Now the reason why Raspberry Pi is successful is
because of the various ways it can be used, this is because Raspberry can be
used in every electronic project that requires a computing brain.
If you are one who is creative and has a vast imagination you would be able
to pull off projects with Raspberry Pi that would put the world in awe. Why
don't we see some of the amazing projects that are possible to create using
Raspberry Pi?
Weather station with Raspberry Pi
Now if you are someone who is still at the beginning stage, this might be
one of the best Raspberry projects, you might want to indulge in. you will
learn the principle of Raspberry Pi and also increase your knowledge and
experience for later projects just by building your weather station that
collects and analyses atmospheric data.
Choosing also from m a large number of physical sensors and
complimentary Python libraries will enable you to control their function.
Let us take a look at some of the highlights of the project.
image21
The rate at which social media has influenced the world by connecting us
irrespective of what country or tribe that we are from. Twitter which is one
of the fastest and largest growing social media platforms, allows room for
developers to create a real-time Twitter bot through their API. This right
here is one of the most anticipated raspberry pi projects for open source
enthusiasts.
image22
image23
Building a network monitor that is quite handy does not come across as
easy, except if you are a computer genius or wizard then this is likely what
you might want to get engrossed in, and it could be the best Raspberry Pi
project for you, giving you the convenience of monitoring your server's
activities.
Just like every other internet-based Raspberry Pi project, this project will
put your network skill to the test and aggravate the expertise for future
Raspberry Pi projects.
image24
This is where all cameras should be called out. If you are a lover of online
games then this Raspberry Pi project best suits you. Minecraft has become a
household name since it was released and it is one of the top gaming
Microsoft projects today.
Raspberry Pi comes with a version of this mind-blowing game, which you
can take advantage of by allowing you to build your Minecraft server
Raspberry Pi projects. What you will need for this project are a working Pi
board and a fast LAN cable.
image25
The Highlight of The Project
● You need an updated system to be able to process the Minecraft
installation
● To run the game on your Pi, java runtime and tools are needed.
● After all these requirements are met, you launch the server and connect
to it from another computer on the home network and test it.
There are more interesting projects that you can innovate by using
Raspberry Pi like building a tor router, Raspberry Pi NAS File Server, and
many more. You can start by checking online for them, especially if the
project you have in mind is not among the mentioned ones here.
There are pools of projects online and I am certain that the project in your
mind would have been built by someone. If it has not been built before, I
am sure you will see a lot of projects that are related to the one in your
mind.
These ones can guide you into knowing how to go about building your own
ideal project with your raspberry Pi.
Nothing is more beautiful than having to achieve more with less, i mean,
look at how much of things you can do with a computer as small as the size
of a credit card. Now you know how useful and vast that computer in your
hand is, go and make the most out of it.
Blurb
N othing beats a person with the proper knowledge of something. This is
true for the Raspberry Pi.
So if you have been having difficulties with the use of this device,
especially in programming, this book right here will teach you all you need
to know and stand out amongst other programmers.
It doesn’t matter if you are a beginner or not, the simplicity of the details in
this book will help you navigate the Raspberry Pi like a professional.
References
Image1 https://en.m.wikipedia.org/wiki/File:Raspberry_Pi_Logo.svg
Image 2 https://en.m.wikipedia.org/wiki/File:Raspberry-Pi-Zero-FL.jpg
Image 3
https://en.m.wikipedia.org/wiki/File:Raspberry_Pi_3_B%2B_(3990636902
5).png
Image 4
https://en.m.wikipedia.org/wiki/File:Raspberry_Pi_4_Model_B_-_Top.jpg
image 5 https://cdn.shopify.com/s/files/1/1217/2104/files/1_f35829a2-7f3f-
41a7-a741-566b430627c0_large.JPG?v=1574141176
Image 6 https://cdn.shopify.com/s/files/1/1217/2104/files/3_77c72f46-1a7c-
4308-b987-8ae61bf1c082_large.JPG?v=1574141267
Image 7 https://cdn.shopify.com/s/files/1/1217/2104/files/4_411ab5cc-
6071-4890-92ff-4aab34a32db9_large.JPG?v=1574141314
Image 8 https://cdn.shopify.com/s/files/1/1217/2104/files/5_b611073d-
57fe-4cce-9a9e-1e694f1b45d4_large.JPG?v=1574141346
Image 9 https://cdn.shopify.com/s/files/1/1217/2104/files/5_b611073d-
57fe-4cce-9a9e-1e694f1b45d4_large.JPG?v=1574141346
Image 10 https://cdn.shopify.com/s/files/1/1217/2104/files/6_3d13bb53-
60f1-457c-a752-3b68b857e2c6_large.JPG?v=1574141400
Image 11 https://cdn.shopify.com/s/files/1/1217/2104/files/7_f9c6b107-
3718-4378-8b7d-433088a5a143_large.JPG?v=1574141438
Image 12 https://cdn.shopify.com/s/files/1/1217/2104/files/9_53c285f9-
8cf9-4882-b052-0b5c7d47ce8a_large.JPG?v=1574141554
Image 13 https://cdn.shopify.com/s/files/1/1217/2104/files/10_ea35164a-
f5cb-434b-8577-db589abe5392_large.JPG?v=1574141591
Image 14
https://cdn.sparkfun.com/assets/learn_tutorials/7/8/3/screen_01.png
Image 15
https://cdn.sparkfun.com/assets/learn_tutorials/7/8/3/terminal_01.png
1mage 16
https://cdn.sparkfun.com/assets/learn_tutorials/7/8/3/terminal_02.png
Image 17
https://cdn.sparkfun.com/assets/learn_tutorials/7/8/3/terminal_03.png
Image 18
https://cdn.sparkfun.com/assets/learn_tutorials/7/8/3/terminal_04.png
Image 19
https://circuitdigest.com/sites/default/files/inlineimages/u/Raspberry-Pi-
Configurations.png
Image 20
https://circuitdigest.com/sites/default/files/inlineimages/u/Raspberry-Pi-
Unable-to-Access-Pi-over-SSH-Error.png
Image 21 https://www.ubuntupit.com/wp-content/uploads/2019/02/weather-
station-696x341.jpg
Image 22 https://www.ubuntupit.com/wp-content/uploads/2019/02/twitter-
bot.jpg
Image 23 https://www.ubuntupit.com/wp-content/uploads/2019/02/FM-
Station.jpg
Image 24 https://www.ubuntupit.com/wp-
content/uploads/2019/02/Network-Monitoring-Tool-696x392.jpg
Image 25 https://www.ubuntupit.com/wp-
content/uploads/2019/02/Minecraft-Game-Server.jpg