Raspberry Pi 4

The Complete User Guide for Beginners and Pro to Master the New Raspberry Pi 4 with Tips and Tricks for DIY Innovative Projects

Curtis

Campbell

Copyright © 2021 Curtis Campbell

All rights reserved.

It is not legal to reproduce, duplicate, or transmit any part of this document by either electronic means or in printed format. Recording of this publication is strictly prohibited

Disclaimer

The information in this book is based on personal experience and anecdotal evidence. Although the author has made every attempt to achieve an accuracy of the information gathered in this book, they make no representation or warranties concerning the accuracy or completeness of the contents of this book. Your circumstances may not be suited to some illustrations in this book.

The author disclaims any liability arising directly or indirectly from the use of this book. Readers are encouraged to seek Medical. Accounting, legal, or professional help when required.

This guide is for informational purposes only, and the author does not accept any responsibilities for any liabilities resulting from the use of this information. While every attempt has been made to verify the information provided here, the author cannot assume any responsibility for errors, inaccuracies or omission.

Contents

INTRODUCTION

CHAPTER ONE

Requirements to use Raspberry Pi 4

How to set up Raspberry Pi 4

CHAPTER TWO

Raspberry Pi 4 Hardware Configuration

Raspberry Pi 4 Storage

Raspberry Pi 4 CPU

CHAPTER THREE

How to control Raspberry Pi from anywhere

How to install Ubuntu desktop on Raspberry Pi 4

CHAPTER FOUR

How to install python3 on Raspberry Pi 4

How to set up several LINUX users

CHAPTER FIVE

How to install Windows 10 on Raspberry Pi 4

How to open the terminal on Raspberry Pi 4

How to update Raspberry Pi 4

CHAPTER SIX

How to take a screenshot on Raspberry Pi 4

How to take screenshots on Raspberry Pi 4 using Scrot and PrtSrc

Update from Jessie to Stretch

CHAPTER SEVEN

How to install software

Update your Raspberry Pi for Scratch 2.0

How to set up the sound on Raspberry Pi 4

CHAPTER EIGHT

The Raspberry Pi 4 Camera Module

How to connect the Camera Module

How to connect to the internet using Raspberry Pi 4

What makes the Raspberry Pi 4 special?

CHAPTER NINE

Building Pi Web Server

Building Pi Home security system

PIR motion sensor

CHAPTER TEN

Building Raspberry Pi Jukebox

Install the latest Raspbian on the Raspberry Pi 4

Hook up your display

Share your PC's music library

Install and Configure MPD

Set up Music Library.

Configure USB Drive Access and Networking.

Install Jukebox and use it

CHAPTER ELEVEN

Building Pi 4 Touchscreen Tablet

Raspberry Pi Boot Problems

Probable solution

CHAPTER TWELVE

NOOBS OS Still on Splash Screen. What To Do?

The proffered solution

Not able to access Raspberry Pi over SSH, What to do?

The board turns off sporadically, what can you do?

CHAPTER THIRTEEN

USB not working perfectly

Keyboard character showing errors in Raspberry Pi 4

Raspberry Pi 4 Camera not functioning well

CHAPTER FOURTEEN

Raspberry Pi 4 not functioning well with an HDMI based display

Raspberry Pi 4 SD Card issues

Ethernet on Wi-Fi Off

CHAPTER FIFTEEN

Attempting to alter password hangs in the Raspberry Pi 4

Setting up a circuit on Raspberry Pi 4

CHAPTER SIXTEEN

How to backup

How to restore backup files on your Raspberry Pi 4

CHAPTER SEVENTEEN

What is a GPIO header?

Installing Raspberry Pi desktop on Mac or PC

How to set up a Minecraft game server

CHAPTER EIGHTEEN

How to print with the Raspberry Pi 4

How to create a Twitter bot using Raspberry Pi 4

CHAPTER NINETEEN

How to flash an LED light

How to use a PIR sensor

CHAPTER TWENTY

How to use a light-dependent resistor

How does a light-dependent resistor work?

Applications of the Light Dependent Resistor

CONCLUSION

INTRODUCTION

Raspberry Pi is a small and cheap PC that can be purchased without breaking the bank. Unlike other Raspberry Pi like the Raspberry Pi Zero, Pi 2, and Pi 3, the Raspberry Pi 4 is the latest version of the Pi models.

Furthermore, the Raspberry Pi 4 can be used to make exciting projects, learn to code, build robots and set up other interesting things. Like a PC, the Raspberry Pi 4 can also perform the same functions as browsing the internet, playing games, and listen to songs.

What's more? Raspberry Pi 4 also allows you to set up your personal Operating System, and connect circuits and wires to the pins on the available board. With the Raspberry Pi 4, you can learn programs in languages such as scratch and python.

The new Raspberry Pi 4 is a much faster device and it is also a credit-card-sized electronic board that can perform multiple functions including being used as a file server, router and so much more.

Other functions of the Raspberry Pi 4 include being used to build tablets, used for capturing pictures on space edges, used for running an experiment on International Space Station, used for decoding 4K video and so much more.

CHAPTER ONE

Requirements to use Raspberry Pi 4

Since the Raspberry Pi is only but a motherboard, hence, the reason you need extra components like a mouse, keyboards, and other components to make it functional.

Most times, the components are cheap and do not require you to break the bank to get. Here is a list of the requirements to use the Raspberry Pi 4:

- Mouse

- Micro SD Card (NB: This is the most essential requirement needed to use Raspberry Pi 4 and they come in different types

- Keyboard

- Micro-HDMI

How to set up Raspberry Pi 4

After getting a clue of the requirements needed to use Raspberry Pi 4, you can now proceed to set up your Raspberry Pi 4.

Set up Raspberry Pi 4 in the following ways:

1. Firstly, connect to a display. You can either get a digital 4K monitor or any other display device.

2. Proceed to connect the HDMI to the Raspberry and the other display monitor.

3. The subsequent stage needs you to connect your device to the internet (NB: For this process, you can either use a wireless connection like Wi-Fi or an Ethernet cable) . Note that the internet connection is expected to be fast.

4. At this point, we are yet to boot or turn on the Raspberry Pi. So, you are mostly advised to use an Ethernet cable when you seek to connect to the internet in the last step. To do this, connect one end of the Ethernet cable to the Raspberry Pi Gigabit Ethernet port and the other end to the access point.

5. Go ahead to connect your preferred component to the Raspberry Pi (NB: The Raspberry Pi has 4 USB ports that allow for USB 3.0 and USB 2.0 connections) .

6. As mentioned above, connect the components to the USB ports and ensure they are well fitted in. Also, your Raspberry Pi has standard Bluetooth support and you should not attempt inserting the Bluetooth components into your USB slots.

7. After the components have been successfully connected, the next step requires you to switch on the Raspberry Pi. To achieve this, connect the micro USB cable to the power supply and ensure you are using the developer's power cable (NB: Also connect the other part to the 5v power adapter) .

8. Ensure your SD card includes NOOBS on it. If it doesn't, make sure you do not switch on your Raspberry Pi.

9. There you have it, you have successfully set up your Raspberry Pi 4 and you can begin using it.

CHAPTER TWO

Raspberry Pi 4 Hardware Configuration

The Raspberry Pi 4 is packed with exciting features and you can begin to use them once you have set it up. Asides from its exciting features, the Raspberry Pi 4 is also versatile in its operation.

Individuals can purchase a Raspberry Pi kit that has all its included hardware parts and the OS to operate. (NB: It is crucial to know that the Raspberry Pi 4 hardware parts have gradually advanced in recent years with every Pi model including features that are different from its past models) .

Raspberry Pi 4 Storage

There has been a massive upgrade in the Raspberry Pi storage capacity. In the former Raspberry Pi models, there was a feature of 128MB in the CPU and another 128MB in the GPU.

Meanwhile, in the new and updated Raspberry Pi 4, there is a feature of 3 different storage capacities. For instance, it comes in 1GB, 2GB, and 4GB storage capacities, making it highly sought after by Raspberry Pi users.

Raspberry Pi 4 CPU

Even with the major changes recorded in the latest Raspberry Pi models, every model still features a Broadcom System on Chip (Soc) alongside an ARM-compatible CPU. The new Raspberry Pi 4 model features a clock speed that is between 700 MHz – 1.5 GHz.

Furthermore, the Raspberry Pi 4 also includes a quad-core ARM Cortex-A72 processor, and this succeeds the Raspberry Pi 3 B+ processor that has quad-core Broadcom BCM2837BO that also included a clock speed of 1.4 GHz. More so, the Raspberry Pi processors allow for overclocking when booting takes place, and this happens when you run the command while the booting procedure is ongoing. A majority of the processors that have the overclock feature are usually around 800 MHz to 1000 MHz and also 1500 MHz on harsh ends.

CHAPTER THREE

How to control Raspberry Pi from anywhere

Have you thought about controlling your Raspberry Pi from anywhere in the world? Or you have multiple reasons for wanting to control your Raspberry Pi? Well, we have the perfect answer for you that can make you manage your Raspberry Pi remotely notwithstanding your present location.

To use the device away from your home network, get several things like an IP address, set some settings on your home router and so many others. Meanwhile, if you only want to control some things on your Raspberry Pi, you can do so by following some settings.

First of all, you have to set up and connect your Raspberry Pi to a home network. Also, because your Raspberry Pi will be used via the internet, it is important to alter your default password while the setup process is ongoing.

When you are done with the above steps, check below to gain control of your device from anywhere:

- Remote log into your Raspberry Pi's operating system with VNC connect

This is the first method through which you can control your Raspberry Pi from anywhere worldwide.

What is VNC? VNC is the most used method of gaining access to any PC remotely on the same network. In recent times, VNC connect emerged, making it relatively easy and stress-free to connect your Raspberry Pi from anywhere in the world using a cloud connection. After setting up VNC connects, you can easily operate your Raspberry Pi's graphic interface from another PC or device by using the VNC viewer app.

Additionally, VNC connect is cost-free, meaning you don't have to spend to use the feature. Before proceeding, you have to check if you have PIXEL already installed but if you do not, you are expected to install it and activate it by launching Terminal on your Raspberry Pi and entering some commands which can be found below:

1. Enter update and hit Enter.

2. Proceed to enter and hit Enter.

3. After following the first two steps, enter and hit Enter.

4. Then navigate down to VNC and ensure it is turned to Enabled.

After concluding the above steps and finalizing its download, you can now proceed to set up VNC connect to control your Raspberry Pi successfully from anywhere in the world.

1. Launch the RealVNC Raspberry Pi sign-up page and type in your email address (NB: The space to type in your email address resides in the sign-up field) .

2. Ensure you adhere to the instructions on the screen to conclude activating your account using a certified password.

3. Move to your Raspberry Pi and select the VNC logo located on the upper right-hand side of the screen to launch NVC. Afterward, select the status menu and click Licensing.

4. Type in the email address and password once more you created newly in the first step.

5. When asked, choose the option "Direct and cloud connectivity." From there, your Raspberry Pi can now be operated and used via the internet.

6. Proceed to download the VNC viewer app on your PC if you want to control your Raspberry Pi from your PC. (NB: Alternatively, you can also download the VNC viewer app on your smartphone if you want to control your Raspberry Pi from your smartphone) .

7. After downloading and installing the VNC viewer app, launch it and type in the email address and password you newly created in the first step.

8. From there, your Raspberry Pi will come on your screen automatically. Ensure you click on it to launch the connection. When asked, type in your Raspberry Pi's username and password and wait for some seconds for the connection to take place (NB: By default, your Raspberry Pi username is set to pi while the password is usually set to raspberry) .

Once you are done, you would have the chance to log into your Raspberry Pi's graphic desktop from anywhere in the world. However, before this can happen, ensure the device you are using is connected to the internet.

How to install Ubuntu desktop on Raspberry Pi 4

Perhaps you don't have an Ubuntu desktop on your Raspberry Pi 4, well, we have the walkthrough to guide you to install an Ubuntu desktop on your Raspberry Pi 4.

Meanwhile, before you proceed, you need to obtain the following list of things:

•      A Raspberry Pi 4

•      A USB keyboard

•      A microSD card (9GB least and 1GB recommended)

•      A micro USB-C power cable

•      A micro HDMI cable

•      A PC with a microSD card drive

•      A monitor with an HDMI interface

Once you have obtained the above list of things, the next step is to proceed to install Ubuntu desktop on your Raspberry Pi 4 by following the below list of things:

1.     Get your SD Card ready

Be aware that adhering to the below list will clear all your existing information on your microSD card.

The processes are outlined below:

•      Insert the microSD card into your PC.

•      Install the appropriate Raspberry Pi Imager for your OS. This can be done on Ubuntu by running: sudo snap install rpi-imager.

•      After doing this, begin the Imager and launch the "CHOOSE OS" menu.

•      Navigate down the menu and select "Ubuntu".

•      From there, you will find a list of Ubuntu downloads to choose from. At this point, click the "Ubuntu 20.10 Desktop icon. Be aware that this option will only work for Raspberry Pi that has either 4GB or 8GB RAM.

•      Choose the image and launch the SD Card menu. Click the microSD card you have placed and enter "WRITE". Wait for some minutes for the process to take effect.

2.     Boot your Desktop

•      This is the next step to take if you want to install Ubuntu on your Raspberry Pi 4. While doing so, make sure your HDMI screen and USB keyboard and plugged in before switching on your Raspberry P. You will find the progress of the booting on your screen and you can then run the wizard.

•      At this point, choose your language and set your keyboard layout. For instance, American and British keyboard users can use the ' " ' and '@' keys to verify they are in the appropriate spot.

•      Subsequently, choose a timezone (NB: A timezone is important because it provides the correct time for you) .

•      After sorting out the above function, you will be asked to set up a username and a password.

•      Once all that is done, you will be presented with a screen that reads "Welcome to Ubuntu Desktop".

3.     USB Boot (Alternative option)

As an alternative option, you can decide to boot from a USB attached SSD or hard drive with no inclusion of a microSD card. This has to be completed after booting from an SD card. Meanwhile, the entire Raspberry Pi 4 model has an EEPROM configuration that boots from an SD card, but you can change it.

First of all, check if you have an updated EEPROM version on your Raspberry Pi 4:

From there, extract the present boot loader configuration to a text file:

To make any alterations enter:

At this point, it is important to send the image on the hard drive. Once that is done, you can be able to boot Raspberry Pi 4 from your hard drive.

NOTE: Take note because a few hard drives have problems while they are used to boot the Raspberry Pi 4. Most of these problems include:

•      Hubs can result in compatibility problems. So is much better if you use an SSD to boot.

•      Also, spinning hard disks need too much power than SSD and will most likely want a powered USB hub.

CHAPTER FOUR

How to install python3 on Raspberry Pi 4

If you don't have Python 3 installed on your PC, you have the option to install it for the different OS including:

- MacOS

- Raspberry Pi Linux and OS

- Microsoft Windows

Install Python 3 on macOS by following the steps below:

1. Launch your browser and enter www.python.org/downloads.

2. While on this page, you will find an icon to install the new version of Python 3.

3. From there, select the button and the download process will begin automatically.

4. Once Python 3 has been successfully installed, tap the download button to begin installing Python 3.

5. Select Continue and adhere to the installation guide to make your installation process hitch-free (NB: During this process, ensure you are patient because the installation process might take a little while to conclude) .

6. Select Close when the installation is done.

7. From there, launch IDLE from your apps list.

Install Python 3 on Raspberry Pi Linux and OS by following the steps below:

Before we get started, a majority of Linux distributions have Python 3 installed without having to download it, however, they may not have IDLE already installed. The only one you might find is Interactive Development Environment.

You can use apt to verify if the entire above functions are already installed, or install them if you can find them:

1. Launch a terminal window and enter: "sudo apt update sudo apt install python3 idle3".

2. At this point, IDLE and Python 3 will be downloaded and installed.

3. Check your apps list to see both IDLE and Python 3 installed.

Install Python 3 on Microsoft Windows below:

Before you begin, ensure you install Python from the Microsoft Store. If you cannot do this, you can alternatively do so by using a Python installer when you open www.python.org .

Download and install Python 3 on Microsoft Windows from Microsoft Store by following the steps below:

1. Launch the Python 3.8 app in the Microsoft Store .

2. Select the Get icon to download and install Python 3.8 successfully.

3. From there, your system will download and install Python 3.8 (NB: You can locate the progress of the installation procedures in the notification bar) .

4. Once Python 3.8 has been downloaded and installed successfully, you will be notified.

How to set up several LINUX users

There are two utilities for adding user accounts in Linux and Unix systems. They include user add and add user. The two commands are specially made to create one user account in the system. Meanwhile, assuming you have several users accounts you want to create? It is at this point you will have to get a program known as new users.

In fact, Newusers is an important command-line utility meant for updating and creating a new user account. If you want to set up several Linux users, you should be able to give their details in a file in the below format, similar to the standard password file.

The above command means the following:

- pw_name: Username

- pw_passwd: User's password

- pw-uid: User's Identification

- pw_gid: User's group identification

- pw_gecos: It defines comments sections

- pw_dir: It defines the user's home directory

- pw_shell: It defines the user's default shell

NOTE: You must protect the input file because it includes unencrypted passwords. You can do so by setting the right permissions and ensure it is readable and writable by root.

For example, assuming you want to add the user accounts tecmint and ravi, you can do so by creating a file "users.txt" as seen here:

.

In the beginning, the newusers program will attempt to make the required number of accounts and proceed to write the alterations to the user database. If there are any mistakes asides from the last writes to the database, no form of alterations is applied to the database. The newusers command works through the above ways.

CHAPTER FIVE

How to install Windows 10 on Raspberry Pi 4

Because Windows 10 is being installed in ARM platforms like Samsung Exynos and Qualcomm Snapdragon, you can now install Windows 10 on desktop applications on ARM devices like Raspberry Pi 4.

There are several methods to install and make the Windows 10 run on a Raspberry Pi. As a matter of fact, Microsoft has permitted users to run Windows 10 IoT, which is a model of Windows 10 specifically designed for prototyping and not running real desktop experience.

By default, Microsoft does not permit you to run the actual version of Windows 10 on the single board PC, however, there are a few tech projects that permit you to install the OS on your Raspberry Pi 4 and make it much more functional.

Before you get started, check out the requirements you need to have before installing Windows 10 on your Raspberry Pi 4:

- WiFi dongle or Ethernet

- Mouse, keyboard, or monitor

- Raspberry Pi 4 using 4GB RAM. Alternatively, you can utilize your Raspberry Pi 4 with 8GB RAM, however, this process allows for a minimum of 3GB RAM

- 32GB or more microSD card. You can get a much faster one if you have the opportunity to

Install Windows 10 on Raspberry Pi 4 by following the steps below:

1. Insert your microSD card on your desktop.

2. Proceed to download and save a copy of Windows 10 on ARM from a third-party service like the WoA Discord group. Alternatively, you can download a UUP image of the Operating System and change it into ISO.

3. Then download and run Windows on Raspberry tool.

4. While in the WoR tool, choose the right USB 3.0 device and verify the Raspberry Pi 4 option.

5. Choose your ARM image.

6. While on the subsequent screen, choose the "Use the latest package available on the server" option.

7. Then choose the "Use the latest firmware available on the server" option when prompted to configure firmware.

8. While in the configuration screen, choose advanced and modify the memory limit to 8192 MB. (NB: In a case whereby you chose not to alter the memory limit, your Raspberry Pi 4 will be locked to 1GB RAM) .

9. Select Next and hit Install (NB: Be patient because the installation process can go on for as long as three hours and the speed of the installation process is dependent on your microSD card) .

10. Terminate the WoR tool.

11. Alternatively, you can utilize a partition manager to increase the space of the system drive with the undistributed space in the SD Card.

12. Navigate back to the Discord group and proceed to download the RAM fix from the Downloads option.

13. Launch the File Explorer and find the drive that has Windows 10 on ARM installed. (NB: You may the name as 'Windows, and after locating the name, create a note of the drive letter) .

14. Launch an elevated Command Prompt and move to the directory in the place you extracted WinPatch.

15. Ensure you use this command after altering the drive letter: After doing so, terminate the entire application and safely remove the microSD card before inserting it into your Raspberry Pi 4.

16. From there, switch on the Raspberry Pi 4 and set up Windows 10.

17. Move over to your desktop screen and launch Task Manager. Then check twice to see the installed memory. In a case whereby you have 1GB RAM, you have to run "bcdedit /deletevalue {default} truncatememory" in the command prompt to activate 3GB RAM.

18. Hit Enter to run the Windows 10 command on your Raspberry Pi 4.

How to open the terminal on Raspberry Pi 4

Linux shell and the terminal can be referred to mean one thing. As we all know, Raspberry Pi is a Linux-based OS and it offers Linux Terminal as well.

Check below to open the terminal on Raspberry Pi 4:

1. First of all, select the fourth icon on the upper left-hand side of your Raspberry Pi screen.

2. Enter "help" in the shell and you will find a list of commands made available on the screen. (NB: The list of commands you will find are all supported by Raspberry Pi Terminal) .

How to update Raspberry Pi 4

It is important to update your Raspberry Pi 4 regularly. Updating your Raspberry Pi 4 fixes all bugs and brings you to see the new features that the developers work day and night to embed.

- Users can update their Raspberry Pi with the Add and Remove Software app . Simple launch it by clicking on it from the Preferences part of the menu. (NB: Before checking and installing the updates you find, ensure you refresh the software package list on your Raspberry Pi) .

- Select Options on the upper left-hand side of your screen and choose Refresh Package Lists . (NB: From there, your Raspberry Pi will be updated including your entire list of packages) .

- After a successful update, select Options and choose to Check for Updates .

- At this point, the Package Updater will be launched and it will also automatically check if there are available updates (NB: Check your screen because the package updater will display things that may interest you) .

- Perhaps you find an available update, simply select Install Updates .

- When asked, type in your password. (NB: Meanwhile, if you are yet to alter your password, simply know that it is 'raspberry') .

- From there, the updates will begin downloading and after a successful download, it will be installed (NB: The installation progress can be seen on the lower left-hand side of your screen) .

CHAPTER SIX

How to take a screenshot on Raspberry Pi 4

Notwithstanding the type of PC you are using, there are still some occasions whereby you would want to take a screenshot on your Raspberry Pi 4. Alternatively, you can also learn how to write instructions that reveal how to carry out a task or if you prefer to share something you found in an application or web page.

As we begin, it is not difficult to capture screenshots on any Raspberry Pi, including the Raspberry Pi 4 (NB: Meanwhile, your Raspberry Pi model must be running on the official Pi OS before this can be made possible) .

How to take screenshots on Raspberry Pi 4 using Scrot and PrtSrc

All Raspberry Pi models have a built-in screenshot tool known as Scrot, and it is efficient for capturing the entire screen by simply pressing the PrtSc button. Once you have pressed PrtSrc, Scrot will proceed to save a PNG graphics file to your home folder using the current date and time to represent the name of the file.

On the other hand, users can choose to use Scrot through the command line to derive some extra flexibility.

Additionally, if you wish to capture an exact window, you are expected to use the –s option and select the window you want and it will automatically be saved.

Update from Jessie to Stretch

Users are allowed to download the latest Rasbian version identified as Stretch. If you are not patient and you like to gain directly from new kernel and software versions, you can easily check below to complete this process:

1. View available disk space

To update to Raspbian Stretch, you have to make sure if there is enough space on your SD card. Consequently, you should verify if the available space is enough for the update to take place (NB: If you don't have enough or available disk space for this step, you need to ensure you delete a few unimportant things) .

2. View package status

After checking if there is enough space, the next thing to do is to also check your package status and ensure they are all good enough for an upgrade. These commands show all packages that include status semi-installed or failed configuration and even the ones that have error status:

3. Update system.

You can then proceed to upgrade your system after checking your space and package status.

4. Change the release.

After updating to the latest Raspbian version, the package list needs to adapt to the Stretch release. To accomplish this process, you only have to replace Jessie with Stretch. It is important not to ignore any position, and the easy way to do so is by following the command below:

5. Update package list.

Following the change of the release, you need to update the new package list and import them as at when due:

6. Update to Stretch.

This is where the real update takes place. Follow the command below to begin the update process:

Note that the update process takes place in two steps:

The first step is that there would be a small update to prevent conflicts and finish the update. Furthermore, the update is likely to take some time depending on the speed of your internet connectivity. You need to devote a little attention to this process because some configuration files need to be manually updated. Consequently, Raspbian will request most times if you want to substitute some configuration files with the latest ones.

Meanwhile, if you have made alterations to single configuration files before, you need to make sure you hit D representing Display Differences or N representing Not Replace based on the files, or even Y representing to substitute the former configuration file with another one.

7. Clean up installation.

In this section, you need to delete old and unneeded packages once the system update is done and it can be completed by following the commands below:

Once the above has been completed, your Raspberry Pi 4 will restart, reboot, and have its update from Jessie to Stretch.

CHAPTER SEVEN

How to install software

There are several software apps and programs you can download and install on your Raspberry Pi 4 (NB: To install software, your Raspberry Pi 4 needs to be connected to the internet) .

Installing software on your Raspberry Pi 4 can be accomplished by following the below methods:

1. While in the menu bar, select Preferences and click Recommended Software .

2. Proceed to check through all the recommended software, or choose to filter it by category.

3. If you find the software you want, you can install it by check-marking the open field on the right-hand side of the software program or application you want.

4. Select Ok .

5. Asides from Raspberry Pi's recommended software, you can alternatively find a large variety of other apps and software programs you can install.

6. To be sure the above work well, select Preferences and choose Add/Remove Software in the list of menus (NB: From there, you can look for your preferred software or check through other apps by clicking the category from the list of menus on the left-hand side of your screen) .

7. For example, if you want to install a drawing app known as Pinta, follow the steps below.

- Enter 'Pinta' in the search field and hit Enter .

- Click the option that reads 'Simple drawing/painting program' from the list that is displayed on your screen.

- Select Ok to begin installing.

- When asked, type in your password (NB: Like already mentioned, if you are yet to alter your password, simply enter 'raspberry.’.

- At this stage, the drawing app known as Pinta will be downloaded and automatically installed on your Raspberry Pi 4.

- Once the installation process is done, launch the drawing app (Pinta) by clicking Graphics and also Pinta from the list of menu.

Update your Raspberry Pi for Scratch 2.0

Scratch offers an important aspect to programming for virtually everyone and that is the reason it is included in Raspbian OS that powers your Raspberry Pi 4. This works by writing code to control and reply to the parts connected to the General Purpose Input and Output pins on the Raspberry Pi.

To utilize Scratch 2.0, you have to install the Pepper Flash plugin. The Scratch 2.0 function offers extra features such as the ability to make custom blocks and clones of sprites.

Other feature includes a sound editor, several new sprites, backdrops, costumes, and a vector image editor. Before using Scratch 2.0, you need to have an updated Raspbian OS.

Follow the steps below to view a scratch project:

1. Launch the Chromium web browser from the list of internet menu.

2. Enter the address of the Scratch page you want to open. (NB: For these procedures, the Code Club Rock Band project will be used as an example) .

3. After loading the page, navigate down to the Rock Band project and you will find a grey square on the project (NB: This will happen because the Flash plug-in requires your permission before it can run) .

4. Proceed to right-click on the grey square and choose the option that reads "Run this plug-in".

5. Subsequently, the plug-in will begin and the Scratch project will show on your Raspberry Pi 4 screen.

Let's take a look at the inner Rock Band project itself:

If you open the project page of a former Scratch project and instantly open the "See inside" option, you won't find or see anything. However, to see the inner project, follow the steps below:

1. Right-click on the grey field and choose to "Allow this plug-in to run."

2. Furthermore, select the "See inside" option.

To permit the flash to run automatically, follow the step below:

Before we begin, you should know that this setting is not activated by default due to security reasons because it will automatically permit all-flash projects to run concurrently.

Meanwhile, if you wish to permit Flash plug-in to run all the time, you can achieve this by following the below ways:

1. While in a Chromium browser window, enter about: plugins in the address space and hit Enter .

2. Locate Adobe Flash Player and checkmark the option that reads "Always allowed to run".

How to set up the sound on Raspberry Pi 4

Your Raspberry Pi 4 can send sound or noise to the display's built-in speakers via the analog headphone jack or HDMI connection (NB: However, this process can only work if your Raspberry Pi 4 screen has a built-in speaker) .

Setting up the sound on Raspberry Pi 4 can be done in the following ways:

1. With your PC's mouse, locate the upper right-hand edge and right-click.

2. Then choose Audio Outputs to select if your Raspberry Pi should utilize the V Jack or the HDMI connection for sound purposes.

3. Furthermore, slick the speaker logo to reduce or increase the volume by moving the slider either upwards or downwards.

CHAPTER EIGHT

The Raspberry Pi 4 Camera Module

Raspberry Pi 4 has a camera module in which you can connect to your Raspberry Pi and take pictures; apply image effects, and record video.

However, before you can use the Raspberry Pi 4 camera module, you need to ensure you have the following list of things:

- Raspberry Pi PC with a Camera Module port

In most cases, all modern versions of Raspberry Pi usually include a port for connecting the Camera Module. A point worthy of note is that if you want to utilize a Raspberry Pi Zero, you have to get a Camera Module ribbon cable that can be easily inserted into the Raspberry Pi Zero's little Camera Module port.

- Raspberry Pi Camera Module

There are two models of the Raspberry Pi Camera Module:

- The NoIR version: This does not contain an infrared filter, and this means you can easily utilize it with an infrared light source to capture pictures in a low-light surrounding

- The standard version: This is made to capture pictures in a normal light surrounding

How to connect the Camera Module

Before you do this, make sure your Raspberry Pi 4 is switched off:

1. First of all, find the Camera Module port .

2. Then slowly pull up on the ends of the port's plastic clip.

3. Then put the Camera Module ribbon cable and ensure the cable is placed in the right direction.

4. The next step requires you to push the plastic clip back into its right position.

5. After doing the above, proceed to switch on your Raspberry Pi 4.

6. Navigate to the main menu and launch the Raspberry Pi configuration tool.

7. Choose the Interfaces section and make sure you activate the Camera.

8. Ensure you reboot or restart your Raspberry Pi 4.

Look below to learn how to control the Camera Module by using the command line:

At this point, your Camera Module is connected and linked and you have to activate the software. Next, you can check out the command line known as raspivid and raspistill.

Control the Camera Module in the command line through the steps below:

1. Launch a terminal window by selecting the black monitor logo situated in the taskbar.

2. Enter the below command to capture a still picture and save it your desktop.

Raspistill –o Desktop/image . jpg

3. Hit Enter to run the command. (NB: Whenever the command starts to run, you will find the camera preview launched for 5 seconds before the still picture will be captured) .

4. Check for the picture file icon on the Desktop and ensure you click twice on the file icon to launch the picture.

5. When you add different options, you can likely set the looks and size of the picture the raspistill command captures.

6. Proceed to record a video with the Camera Module by using the below raspivid command.

Raspivid –o Desktop/video.h24

7. If you want to play the video file, click twice on video.h264 file logo on the desktop screen to launch it in the VLC Media player.

Control Camera Module with Python code through the following steps:

Before we begin, the Python Pi Camera library permits you to control your Camera Module and make interesting and attractive projects. Complete this process through the following ways:

1. Launch a Python 3 editor like Thonny Python IDE .

2. Also, launch a new file and save it with the name "camera.py". (NB: During this process, ensure you do not save the file with the name picamera.py) .

3. Type in the command you find.

4. Proceed to save the command and run your program (NB: Be patient because the camera preview will come up on your screen for 5 seconds before closing once more) .

5. The camera preview will only work whenever a monitor is connected to your Raspberry Pi. Assuming you are utilizing remote access like VNC or SSH, you will not be able to find the camera preview. On the other hand, if your preview is on the other side, you would be allowed to rotate it by 180 degrees by using the below code.

Alternatively, you can also rotate the picture by 90, 180, or 270 degrees. If you want to resize the image, ensure you set the rotation to 0 degrees.

While doing all these, it is important to make the preview to be see-through because you need to know if there are mistakes in your program when the preview is enabled.

6. You can make the camera preview see-through by setting an alpha level by following the below command.

Furthermore, the alpha value can be set in the range of 0 and 255.

How to connect to the internet using Raspberry Pi 4

There are several ways of connecting your Raspberry Pi 4 to the internet. For instance, you can insert an Ethernet cable into your Raspberry Pi or use a USB-to-Ethernet adapter (NB: However, these requirements are subject to Raspberry Pi 4, Raspberry Pi 3, Raspberry Pi Zero, and Zero W) .

Connecting your Raspberry Pi 4 to the internet can be done through the following ways:

1. Select the wireless network logo in the upper right-hand end of your screen and choose your network from the list in the menu.

2. Enter the required password for your wireless network and select OK .

3. After your Raspberry Pi connects to the internet, you will find a wireless LAN symbol and not a red cross.

4. You can verify or test your connection by selecting the web browser icon and surfing the internet for raspberry pi.

What makes the Raspberry Pi 4 special?

There are numerous functions and features that make the Raspberry Pi 4 special. For instance, the Raspberry Pi can serve different functions including using it to browse and serving as a desktop PC.

The list of reasons the Raspberry Pi 4 is special are outlined below:

- It can be used as a media center

There are multiple options if you wish or decide to use the Raspberry Pi 4 as a media center; however, the common options are the LibreElec or Kodi-based Oses OSMC.

Additionally, the Raspberry Pi 4 includes the extra benefits of a fast and latest CPU and graphics processor. This makes it capable of playing local H.265 encoded video recorded at 3840 x 2160 resolution and 60 frames every second. An additional benefit of the Raspberry Pi 4 acting as a media center is that it includes built-in support for Wi-Fi and this makes it easy to stream video or audio to the Pi.

- It can run PS1, N64, NES, SNES, and more classic console games

Another reason the Raspberry Pi 4 is special is that it can run PS1, N64, NES, SNES, and additional classic console games. Users can find several vintage games on the Raspberry Pi 4 because of emulators such as RetroPie.

- It can browse or surf the web

The newest version of the Raspbian Operating System features the Chromium browse. It has a massive effect on the 4GB Raspberry Pi 4 and has only but a small bug on a heavy website.

- It can run on several Operating Systems

The Raspberry Pi 4 is cable of running on several Operating Systems like the Ubuntu Mate, Kodi-based media centers LibreElec, OSMC, Raspbian OS, Snappy Ubuntu Core, and others. Additionally, it can also run on Windows 10 IoT Core, which is much different from the desktop version of windows.

- It can run on Windows 10

Although it's can be compared to the full desktop version of Windows 10 that is common, but the Raspberry Pi 4 is still able to run on Windows 10.

- It can run Windows 10 Desktop apps

Another reason the Raspberry Pi 4 is special is that it can run Windows 10 desktop applications. The process of running Windows 10 desktop apps requires a great deal of effort but it is still possible by using the ExaGear desktop software.

- It can run Ubuntu

The Raspberry Pi 4 can also run Ubuntu with several desktops.

CHAPTER NINE

Building Pi Web Server

This is one of the widely known uses of the Raspberry Pi 4 because it lives on the local network. It does not matter if you require an intranet for a small server for performing web development tasks, it is still a perfect option for you. If you want your webserver to function well, you have a Raspberry Pi 4 that is connected to your local and runs on the latest Raspbian OS.

Follow the step below to set up or build a Raspberry Pi 4 web server: n

1. Move over to the command prompt/terminal. Users can achieve this by pressing CTRL + ALT + T from the Raspbian desktop (NB: Alternatively, you can achieve this by connecting remotely through SSH if you have it already configured) . Some users prefer to configure the Raspberry Pi 4 to boot directly to the command prompt.

2. Update or Upgrade your packages by entering sudo apt-get update (NB: Once you do this, you will have the newest versions of the entire file you have already downloaded) .

3. Proceed to install apache2 with the following command: sudo apt-get install apache2-y.

4. Also install Php for your server by entering: sudo apt-get install php libapache2-mod-php-y .

5. Furthermore, install mariadb so you can utilize a mysql database with your site. Do so by entering: sudo apt-get install mariadb-server .

6. Once your download is completed, you need to do so manually by entering: sudo mysql_secure_installation (NB: After doing this, you will be prompted to enter a root password but you are allowed to leave this field empty) .

7. Install the php-mysql connector so that the php pages can get a link to the DB: sudo apt install php-mysql .

8. Reboot apache2 to ensure the alterations you made are running or effective: sudo service apache2 restart.

9. Go ahead to test your server. While on your Raspberry Pi 4, you must open http://localhost and view the test page. When you are on a new PC on a similar network, you can visit the page by opening http://raspberrypi or http://raspberrypi.local but your Raspberry Pi's hostname is known as raspberry pi.

10. Lastly, build your webpage by entering PHP or HTML files in the /var/www/html/directory .

Building Pi Home security system

The Raspberry Pi 4 home security system will inform you whenever an individual is loitering or hanging around your home. You don't have to break the bank to get a home security system when you can easily get one by creating a Raspberry Pi 4 home security system.

This is easily done by setting up your system with a passive infrared motion sensor as well as an LTE modem that will deliver SMS messages when there is a movement.

The requirements to set up a Raspberry pi 4 home security system includes:

- 1 green LED

- 1 red LED

- A SIM card

- A Raspberry Pi 4 with Raspberry Pi OS and Ethernet connection

- An LTE modem

- An HC-SR501 PIR motion sensor

PIR motion sensor

The PIR motion sensor will notice movement whenever something comes from the infrared rays and moves in the direction of the sensor's reach. Furthermore, PIR motion has low power and they are cheap. Their job is only to detect movement and it has two potentiometers.

One of which is for sensitivity purposes and the other is to set the delay time. In terms of the sensitivity aspect, it sets the detection range, and this can be about anywhere ranging from 3 to 7 meters. On the other hand, the delay time adjustment's job is to set how long the output should stay high after a movement is detected.

LTE modem

LTE is an acronym for Long-term evolution and it is a wireless broadband communication based on UMTS/HSPA and GSM/EDGE technologies.

The steps to set a Raspberry Pi 4 home security system are outlined below:

1. First of all, install the software on your latest Raspberry Pi 4. To do this, navigate to the Raspberry Pi's terminal and type in: sudo apt install python3 python3-gpiozero .

2. Set up the modem.

Setting up the modem can be achieved by placing your SIM card into your Long-term evolution (LTE) modem. Also, ensure you mount the antenna on the modem to get a clear signal.

3. Connect the setup modem to your Raspberry Pi 4.

Proceed to connect the LTE modem to any USB port of your Raspberry Pi 4 and be patient for your Raspberry to boot. You can find four new USB ports in the /dev directory by using the following command in the terminal: 1s/dev/ttyUSB .

You can also use the ttyUSB2 port to interact with the device by delivering AT commands.

4. Connect the sensors to your Raspberry Pi 4.

In this step, you have to do two things namely connecting the PIR sensor and connecting the LED lights. If you decide to go with connecting the PIR sensor, ensure you follow the steps below:

- Connect the GND and VCC pins to the relevant pins on your Raspberry Pi 4 and also connect the movement sensor's output pin to the 8 pins on the Raspberry Pi.

The other way to connect the sensor to your Raspberry Pi 4 is to connect the LED lights:

- If you need the indicator LEDs to power on whenever a movement is detected, simply connect the cathode of the LED to a ground pin and also connect the anode to a current-reducing resistor and connect the other component of the resistor to a GPIO pin. Lastly, connect the green LED to the 40 pins and the red LED to the 38 pins located on the board.

NOTE: The above steps are not compulsory

5. Open the program.

With the terminal, make a file that reads motion_sensor.py and enter the code you see. Proceed to locate and alter the following boxes:

- Message.

- Phone number.

Meanwhile, if you are using different pins to connect the sensors, ensure you alter the code well. If everything is already made available, begin the program from the terminal by typing: python3 motion_sensor.py.

On the other hand, if you are unable to begin the program, use the following command: sudo python3 motion_sensor.py

CHAPTER TEN

Building Raspberry Pi Jukebox

Users have several options for using your PC's music library from your stereo, but you need some knowledge on how to utilize it. Also, users can build a Raspberry Pi jukebox that anyone can operate even if they are not confident about using Raspberry Pi 4.

After completing this virtual jukebox, you will get a small, touch screen jukebox in your sitting room that you can always control, play songs with from your music library on a different Computer System. You don't have to worry about the interface because it is easy to comprehend.

Requirements for building a Raspberry Pi jukebox

- A touch screen

- A home server or PC with MP3 files inside it

- A Raspberry Pi

- A case (NB: This is not a compulsory requirement

- A power cable meant for your Raspberry Pi

- An Ethernet cable, keyboard, and SD Card

- Speakers or stereos to connect your jukebox to your Raspberry Pi

The process of building a Raspberry Pi jukebox is outlined below:

Install the latest Raspbian on the Raspberry Pi 4

The first thing you need to do is to make sure you download and install Raspbian OS. Meanwhile, if you are utilizing the PiTFT touch screen display, it will be easy to set it up using Adafruit's custom Raspbian image. You simply have to install the image on your SD card but the OS has to be configured for the display.

Installing the latest Raspbian on Raspberry for Windows is done in the following ways:

- On Windows, download the new version of Raspbian OS and unzip the .img file in it .

- Proceed to also download Win32DiskImager and unzip the .exe file app in it.

- Place your SD card in the Windows Computer with a card reader.

- Launch Win32DiskImager.exe , which is the app you have completed downloading, and click twice on it. (NB: In a case whereby you are using Windows 7 or 8, simply right-click on it and select the option that reads "Run as Administrator") .

- Assuming your SD card is not automatically noticed by the app, select the menu located at the upper right-hand side and select your preferred option.

- Navigate to the image file part of the app and select the small folder logo and select the Raspbian .img file you downloaded.

- Select the Write option and be patient for the Win32DiskImager to carry out its function. On the completion of its function, you need to ensure you carefully remove your SD card and place it back into your Raspberry Pi 4.

For OS X :

- Download the new version of the Raspbian OS and unzip the .img file in it.

- Proceed to download the RPI-sd card builder and unzip the app.

- Place your SD card in your MAC with the card reader.

- Then launch RPI-sd card builder . (NB: Once you do this, you will be prompted to select a Raspbian image. Ensure you select the .img file you previously downloaded) .

- You would also be prompted to clarify if your SD card is connected. Because we inserted it before, it means your SD card is already connected, so proceed to select Continue.

- From there, you will be given a list of SD card options and if you have just a single one inserted, you will not find anything more in the list. But if that's not the case, simply verify from the single card you will like to use and select Ok.

- Type in your admin password and select Ok .

- You will be prompted to clarify if the SD was removed. This is so because the app needs to remove it so you can carry out a direct copy. Ensure you check once more to ensure your SD card is not in the Finder anymore (NB: While you do so, make sure you do not eject it from your USB port and select Continue to move ahead) .

- Once RPi-sd card builder is done with your SD card, carefully remove it and place it back into your Raspberry Pi 4.

Hook up your display

Your Raspberry Pi 4 features a GPIO that the touch screen can contain. If you carefully search your Raspberry Pi, you would find a set of pins on the edges. Whenever it is already hooked up, insert your keyboard, power cable, and Ethernet cable. From there, you will be prompted to adjust the touch screen. Ensure you adhere to the on-screen instructions to complete the process.

Share your PC's music library

Before you begin operating your Raspberry Pi 4, you need to set up music sharing on your PC. The procedures for sharing and working on your PC's music library are different for Mac and Windows users.

For Mac users:

1. First of all, launch System Preferences .

2. Select Sharing .

3. Ensure the File Sharing field is marked.

4. Select the "+" below shared folders and choose your preferred music folder before selecting "Done....

5. Navigate or return to the Sharing menu and choose "Options.

6. Choose the option that reads "Windows File Sharing" and type in your password (NB: This will allow your Raspberry Pi 4 to easily get hold of your files) .

7. At this point, your PC is already sharing its music library and you can go back to your Raspberry Pi 4.

For Windows users:

1. Move to your PC's music folder.

2. Right-click on the music folder and click "Share with" and choose a domain (NB: Perhaps if you are the only individual on a home network, you can ensure it's placed at public so that other PCs can still access it on your home network. On the other hand, choose the password-protected sharing and type in a password) .

3. Create a note that represents the folder's location as well as your PC's name (NB: For instance, it can look like ThorinPC/Music) .

Install and Configure MPD

Recall that the basis of the Raspberry Pi jukebox is Music Player Daemon (MPD). Also know that it is a server-side app specifically for playing songs. As a result, it means it is without a graphic interface, and it permits your Raspberry Pi 4 to play music files.

In this step, users do not have to move or navigate around the command line to utilize the Raspberry Pi jukebox after setting it up; however, you have to use it for the first setup procedures.

In the beginning, you have to download MPC and MPD (NB: These acts as the controller in question) . Remember that after booting up your Raspberry Pi 4 before, you closed the touch screen calibration. If you don't, you would be in Raspbian and you will be required to select the menu icon and click "Log Out." While at this stage, you need to carry out most of the steps in the Raspberry Pi's command line by entering: sudo apt-get install mpd mpc .

Be patient for the installation process to take place and after its completion, you are expected to change some settings by entering: sudo nano /etc/mpd.conf

Also locate the line that begins with: #zeroconf_enabled "yes" and erase the # that begins the command to remove the comment. Furthermore, on your keyboard, hit CTRL + X and choose Y to save and close.

Set up Music Library.

The next step will be to point MPD to your music library and set up the music library. To achieve this, you need to create a folder and mount your music library inside it. Additionally, you also have to do with a majority of this with the sudo command because root privileges are essential for the entire function to be installed and working as it should.

Begin by creating a folder with the following command: sudo mkdir /mnt/music .

Subsequently, you need to ensure it is mounted when the Raspberry Pi boots up. For this stage, enter the following command: sudo nano /etc/fstab

After, add the below line. But before that, you need to change your PC name with the information and folder name you made available in step 3 for the location of your music folder:

As a matter of notice, if you need a login to your shared folders, you will have to substitute guest with .

Once done, hit CTRL + X to save and close. Consequently, you need to test and ensure the mounted function is working as it should. Enter the following command to do this: sudo mount –a

If you were not sent an error message, then you are sure it is mounted properly. Next, proceed to take a fast glance to ensure your entire music files are in the right place before entering this command:  1s -1 /mnt/music

Here, you should be able to view your entire music files. After that, you have to make a symbolic link for MPD so you can be sure to know where you are heading in search of the files. Enter this command: sudo 1n –s /mnt/music /var/lib/mpd/music .

Next, your MPD should be ready to go. What you only need to do is to scan your music library to ensure everything is in place before entering: mpc update.

With regards to the size of your library, this process may require some time to complete.

Configure USB Drive Access and Networking.

Succeeding the above step is to configure Zeroconf, which permits you to control your Raspberry Pi jukebox when you are not using your device and you don't want to take a step to use your touch screen. To achieve this, enter the following command: sudo apt-get install libness-mdns

Once that is finished, start it up with the following command: sudo service avahi daemon restart

At this point, you can either free to utilize a smartphone application such as MPDluxe for iOS and MPDriod for Android which serves as a remote control for your Raspberry Pi jukebox, or not use any.

Meanwhile, before you do so, you have the option to set up the Raspberry Pi jukebox to read files from a connected USB drive, which people can easily carry contents on. Unfortunately, you cannot connect your mobile phone to access your music because there is a strong chance that your Raspberry Pi 4 will not recognize it.

If you decide to activate USB support, enter the following command: sudo apt-get install usbmount and point MPD to the USB sticks with the command: sudo ln –s /media/ /var/lib/mpd/music/ .

Once completed, you would be allowed to play music from anywhere you are with different devices.

Install Jukebox and use it

This is the final step in your pursuit of knowing how to set up a Raspberry Pi 4 jukebox and using it effectively. Here, your Raspberry Pi can now gain access to your music and play it from the command line area. Meanwhile, you can learn about setting up the touch screen interface by utilizing a program or app referred to as Pi-Jukebox. The program is a frontend for MPD that lets users use the touch screen to control music playback.

The installation process in this stage is easy and it is done from the command line by following the command:

Running the above command will download the entire files meant for your Raspberry Pi and place them in your Pi Jukebox folder. Meanwhile, you cannot open or run it without installing the following Python command: sudo apt-get install python-pip

After installing the above Python command, you can now proceed to run the Pi Jukebox program. If you want to open the Pi Jukebox, you will have to enter just a single command which is: sudo python pi-jukebox.py

Assuming everything goes the way it should without any issue, you would see that the Pi-Jukebox software resides on your touch screen. The interface should work the way you want. In fact, you are allowed to swipe up and down to navigate your library or select any of the controls to begin and stop playing the music, as well as selecting something to load.

It is also important to know that the Pi-Jukebox is effective like the regular jukebox, so you need to add each of your choices to a currently playing playlist. You won't find a direct way of playing an album if you do not add it to your playlist.

Finally, the settings are not difficult to understand and you can check them to know what each of them stands for or represents. Furthermore, users can set their jukebox to repeat tracks, shuffle and carry out more tasks.

CHAPTER ELEVEN

Building Pi 4 Touchscreen Tablet

If you have thought about building a touch screen tablet with Raspberry Pi 4, then you are in the right place. Alongside the Raspberry Pi, you need a rechargeable battery, touch screen display, and a few 3D printed casing, and others to build a touch screen tablet.

Materials and parts needed for this project include:

- SPDT Slide Switch

- 16GB microSD card

- Raspberry Pi 3 and above

- Raspberry Pi official 7" touch screen display (NB: It is recommended that it should be about 200mm ribbon cable

- 2500mAh Lithium-Ion Polymer Battery

- Adafruit PowerBoost 1000C

- 3D Printed casing

Asides from the above parts, you also have to purchase the following from the market:

- Hot glue gun

- A solder and soldering iron

- Wire strippers

- Screwdrivers

There are two touch screen options you can go with on the Raspberry Pi 4. The two includes:

1. LineageOS 8

The most recommended option for the touch screen project is a Raspberry Pi version of LineageOS 15.1.

2. EmteriaOS

This can either be purchased free or for a couple of bucks.

The process of making the touch screen project is outlined below:

1. Position the Raspberry Pi touch screen display on a different surface and then get the screw holes with the mounting holes in the display.

2. When the mounting brackets are in the right position, attach them to the housing and back into the mounting holes.

3. Connect it once more to the Raspberry Pi to the display.

4. With the screws, proceed to secure the Raspberry Pi in the case.

5. Also, ensure you secure the PowerBoost and line up the USB port using the hole in the case. Furthermore, you have to secure the rechargeable battery as well and you can use hot glue to do that.

6. Place a wire from the pin 2 area on the Raspberry Pi's GPIO, while joining it to the PowerBoost's + connector.

7. Place another wire from the pin 6 area on the GPIO to the PowerBoost's connector.

8. Using two of the Raspberry Pi display's pluggable wires, ensure you connect V pin 4 on the Raspberry Pi to 5V and also pin 9 GND to another GND on the display board.

9. Join or attach the slide switch to the PowerBoost, the center pin to GND, as well as one of the exterior pins to EN. Finally, do not forget to secure the switch in the case using hot glue.

10. Then plug or insert the batter into the PowerBoost.

After completing the above methods, screw the rear side of the tablet case to the display housing and insert the Raspberry Pi through the PowerBoost and charge it.

Raspberry Pi Boot Problems

Perhaps your Raspberry Pi 4 is having some booting problems, now, what do you do? The boot issues might be due to some reasons. A boot issue is usually noticed or identified by a RED LED light-activated while the GREEN LED either comes on and off or deactivated.

Probable solution

Before we proceed, it is important to note that the green LED on your Raspberry Pi 4 represents software activity. This simply means that when it is coming on and off at intervals, it is not functioning well. Hence, when the green light stops blinking, the first thing to do is to check the Raspberry Pi software and the SD card slot.

While checking these, make sure the SD card is properly inserted. Meanwhile, if you found out that the SD card is properly inserted, you should also check the SD card to make sure it is correctly flashed with the OS. Finally as regards the SD card, ensure it is without a corrupted file. If it has a corrupted file, clear it and try booting your Pi once more.

Most people prefer to format their SD card and flash it once more with the OS. Most importantly, save your important file on your PC before formatting and flashing your SD card.

After trying all these and you are still experiencing a booting issue, you can contact a professional Raspberry Pi repairer.

CHAPTER TWELVE

NOOBS OS Still on Splash Screen. What To Do?

This issue is one of the leading reasons most people do not like the Raspberry Pi NOOBS software. Whenever this error happens, the Raspberry Pi's boot will remain on the splash screen.

The proffered solution

To solve NOOBS OS remaining on the splash screen, you need to format the SD card and make sure the right NOOB files are copied. In a case whereby this option fails to work, you should attempt another option by checking out another SD card on your Raspberry pi to know where the problem is coming from.

You can also check out the same SD card on your friends or family member's Raspberry Pi. After doing all these and the problem of NOOBS OS is still stuck on the splash screen, you should try to install Raspbian stretch or seek the help of a Raspbian operator.

Not able to access Raspberry Pi over SSH, What to do?

Accessing your Raspberry Pi over SSH is a security feature embedded in the Raspberry Pi stretch OS. It is not an error like what most people will settle for.

Most times, communication using SSH is not enabled for a majority of Raspberry Pi running a new install of the Raspbian stretch.

Proffered solution

To solve the issue of not being able to access Raspberry Pi over SSH, you have to activate or enable communication over SSH below the Raspberry Pi's settings. Also, if you have your Raspberry Pi 4 already connected to a monitor, open Preferences, and click Raspberry Pi configuration.

Whenever the configuration windows launch, choose the radio option with the name "Enabled on the SSH's front." Additionally, if you are running your Raspberry Pi in headless mode, you have to take away or eject the SD card, insert it once more into a Computer System and make an empty with the name SSH.

More so, copy the file to the SD card and place the SD card into the Raspberry Pi 4. At this point, you can now access the Raspberry Pi over SSH.

The board turns off sporadically, what can you do?

This problem means your Raspberry Pi will reboot itself at random intervals and in some cases, whenever the board is turned on, the power LED will be deactivated.

Proffered solution:

Before we proceed, the issue of the board turning off is mostly a power issue. For example, the Raspberry Pi 4 needs a 5V, 2.5A power supply to work well. This means that if you don't have the required power supply, it will surely affect its performance level.

So, you need to get the required power supply for your Raspberry Pi 4 to begin making use of your device well.

CHAPTER THIRTEEN

USB not working perfectly

If your USB is not working well, either USB is not working well, or it is not showing in your Raspberry Pi 4, it means there is an issue that needs to be solved.

Proffered solution:

There are a couple of solutions that are offered if your USB is not working perfectly. They include:

1. The USB device might be faulty: You can check if your USB device is faulty or working properly by testing it with your Computer System or another PC.

2. Your Raspberry Pi 4 might not be receiving sufficient power and that is why it is not able to power on the USB device (NB: The solution here is to make sure your Raspberry Pi 4 is adequately powered) .

3. Your Raspberry Pi 4 is not updated. You must update your Raspberry Pi 4 before you commence any Raspberry Pi project. This should be done to make sure you have compatible and new software working on your Raspberry Pi r. Note that this may be the reason for your hardware not responding to the commands you give it.

4. Driver problems: For the driver problems, make sure the USB device is compatible with the Linux-based OS running on your Raspberry Pi 4. As a matter of fact, Elinuz.org includes a list of USB devices that are supported on the Raspberry Pi 4.

5. Connect or link your device to your Raspberry Pi 4 before turning it on: Although this may not be a major issue, however, based on USB devices such as mouse and keyboard, your Raspberry Pi 4 may require some initialization especially if you seek to connect it to your Raspberry Pi 4.

6. The last solution is thus: In some situations whenever the device connects to your Raspberry Pi 4 but it is not allowed for some functions you want. You can easily verify this by launching the terminal and running the following command: lsusb –t.

Once you run the above command, you will find a list of USB devices connected to your Raspberry Pi 4.

Keyboard character showing errors in Raspberry Pi 4

In certain situations, you may press a particular key on your Pi 4 keyboard and find another key on the screen. This is a problem that has a probable solution for users. Also, this error mostly happens because of the default UK keyboard configuration of the NOOBS and raspbian software.

Proffered solution:

To correct this problem, you have to alter or modify the configuration to the one that represents your language or keyboard. This solution can be carried out by navigating to the raspberry pi's configuration menu below the Internationalization menu and choosing the keyboard set up menu, and navigating down to click the keyboard layout that represents your keyboard language or origin.

Meanwhile, assuming you are working with a display, simply navigate your way to preferences and click the keyboard and mouse settings. Finally, choose a keyboard layout on the latest window.

Raspberry Pi 4 Camera not functioning well

When you purchase your Raspberry Pi 4 newly, there is no certainty that the camera will be activated by default. A new Raspberry Pi 4 requires you to update most of the features before using it.

One of the main features you need to enable before usage is the Camera. Meanwhile, enabling the Camera on your Raspberry Pi 4 should be carried out after your Raspberry Pi has been upgraded and updated.

To achieve this, begin by running the upgrade and update by entering the below commands:

Afterward, enter the following command:

As a result, it will launch the Raspberry Pi 4 configuration window. Once done, navigate down and choose the camera option before clicking to enable the option.

If you possibly want to work with a display, navigate to Preferences and click Raspberry Pi Configuration. After the configuration window is launched, checkmark the option that reads Camera: Enabled .

After doing all the above functions, ensure you restart your Raspberry Pi 4. From there, you would have access to your pictures and feeds. Meanwhile, if you are not still able to use your camera, you can attempt it with another camera and connector strip.

CHAPTER FOURTEEN

Raspberry Pi 4 not functioning well with an HDMI based display

After connecting your Raspberry Pi via SSH but you are still unable to make it show over HDMI, you have two options that may correct it:

1. One of the options is to connect the display to your Raspberry Pi 4 and choose the correct mode either VGA or HDMI on the monitor before switching on your Raspberry Pi 4. Also, ensure that your screen is turned on before switching on your Raspberry Pi 4.

2. Ensure you check or take a glance at your HDMI cable.

Raspberry Pi 4 SD Card issues

If you are using your Pi 4 and you start experiencing some SD card issues, there are a few steps you can take in an attempt to correct the issue. First of all, you need to check if you have the newest firmware version in your Raspberry Pi 4.

If you have updated your Pi or you have the latest firmware version and the problem persists, you can opt to check other issues. For example, there are a few SD cards that do not function on the Raspberry Pi 4. You can find out the list of working and non-working SD cards on the official Raspberry Pi website.

Other solutions you can take include:

- Erase the contents of your SD card, especially if you did not purchase it new and it still has information or data from its previous users.

- Try to download a formatting tool from the SD Association (NB: This formatting tool is available for both Mac and Windows users) .

- Note that reformatting cards are not difficult to carry out in a digital camera. Once you are done writing the photo to the SD card, confirm that you can view the boot partition whenever you insert the SD card into your Mac or Windows PC. Furthermore, the partition should have some files like the kernel. img or start. elf . In a case whereby you were unable to view the files on your SD card, it simply means you have previously made a mistake while writing the image file.

- Also, if you are organizing or preparing your SD card on macOS or Linux with the dd command, the function will automatically remove any former partitions and data. To avoid this, ensure you write the entire card and not the former partition.

- Additionally, if you insert the SD card into your Mac or Windows computer system and you want to write the Raspberry Pi operating system on it and the computer system informs you that the SD card write is protected, it means your SD-card rewriter is not good and needs to be replaced.

Ethernet on Wi-Fi Off

By default on your Raspberry Pi 4, whenever an Ethernet cable is connected to your Raspberry Pi 4, the Wi-Fi connectivity will be deactivated. This function was made possible by the Pi developers in a bid to protect the Pi from security threats. Furthermore, this function is controlled by a configuration called ifplugd which needs to be deactivated if you want to utilize the Ethernet and W-Fi connections concurrently.

If you want to carry this out, you should run the below commands:

sudo update-rc networking disable or sudo apt-get purge ifplugd.

From there, you can now utilize both network options concurrently but remember that this option can create a security risk.

CHAPTER FIFTEEN

Attempting to alter password hangs in the Raspberry Pi 4

This case means whenever you are trying to change the password of your Raspberry Pi 4 hangs and it is not responding due to several reasons.

Proffered solution:

Whenever this problem occurs, it means your Raspberry Pi 4 is not getting sufficient power from the connected power supply. It could also mean that there are a few changes in the output of the power supply.

Correcting this mistake is not so difficult as you would imagine and it only requires you to change the power supply to your Raspberry Pi 4. Alternatively, you can also plug the cable into another port on your computer system.

Setting up a circuit on Raspberry Pi 4

You can connect and set up switch circuits to your Raspberry Pi's GPIO pins. However, before you begin, you need to ensure you have the following ready:

- An installed Raspberry Pi 4. Additionally, you also have to gain access to your Raspberry Pi using a mouse, keyboard, remote desktop, or monitor.

- 4 x 330-ohm Resistors.

- A red LED.

- A solderless prototyping breadboard.

- Male to female jumper wires.

- 3 x 1-ohm Resistor.

- 3 x tactile push switches.

The next step is to build your circuit:

You are required to build a circuit on your breadboard and ensuring that not one of the parts is touching against each other and the LED is connected in the right manner.

Taking a look at the LED, you will find that it contains two little pieces of metal in the colored casing. The two metals are known as Cathode and Anode. Make sure the switches are connected the right way and make sure the switch is not in an open position, otherwise, it will be broken.

Additionally, whenever the switch is in a closed position, the circuit on the two sides will be done. After checking your circuit, proceed to connect the jumper cables to your Raspberry Pi's GPIO pins.

CHAPTER SIXTEEN

How to backup

Knowing how to back up the files or content in your Raspberry pi 4 is an important skill that can save you from losing important documents or files. The backup system allows you to restore the Raspbian Operating System as well as your files. Luckily, there are tons of methods of backing up your Operating System and files on your Raspberry Pi 4.

The first method includes copying the SD card image:

The easiest method of backing up your Raspberry Pi 4 is to copy the whole SD card as an image. This skill is the opposite of flashing your SD card whenever you are installing an Operating System to it. In this step, you are expected to copy the whole SD card to an image file on your PC.

This is the method that leads to the creation of image files. To do this, shut down your Raspberry Pi 4 and safely eject your SD card. Proceed to position it into an SD card reader and connect it to your PC.

Then launch a Terminal window on your Linux or Mac PC, and press df. Ensure you glance through the list of drives on your PC and join the SD card to your PC before pressing df once more.

On a Linux PC, it will look like /dev/dfb1, while on a Mac, it will look like /dev/disk2s1 . Meanwhile, note that the numbers are likely to be dissimilar, so ensure you check with caution. Take a look at what the different commands will look like below:

From there, you are allowed to use the raspbian.img file to restore your whole OS to an SD card with the dd in the opposite or by utilizing an application like Etcher to flash the SD card.

Simply launch the program and select Yes when the security alert window displays. Then type in C:\raspberrypi.img in the Image File text field and select Read. As a result, the SD card will be written to the image file. Once it reads "Read Successful", you can now proceed to select OK.

Second method: Zip the Home folder

The problem with turning the SD card into an image file is carrying out the process frequently. You need to safely eject the SD card from your Raspberry Pi 4 and join it to a PC or Mac and conclude your entire backup process.

As mentioned above, the second method of backing up your OS and files in your Raspberry Pi 4 is to back up only your home folder in a compressed file. Breaking down the file allows you to check through and restore single directories and files. You can use the terminal on your Raspberry Pi to complete this process. Follow the command below:

Proceed to copy the pi_home.tar.gz file to a USB flash drive and ensure it is kept in a safe spot.

Third method: Schedule backups

You can schedule backups by scheduling the tar command as a cron job. A few Raspberry Pi 4 users prefer to use rsync and not tar. This is because it copies the former copies of updated files and not the entire system. However, you have to create an omitted file that will avoid the content of the system.

Another method is to utilize a free program identified as Deja Dup. This free program automates rsync and provides it with a user-friendly interface. In fact, it is a simple program to use and you can easily back up your Raspberry Pi 4 with Amazon S3, FTP, SSH, or simply by copying the files directly to a flash drive.

Once done with all the backup processes, you can check out a new program identified as Backups in Menu and Accessories.

Select Folders to save and checkmark the Home field. Proceed to select Storage Location and alter Amazon S3 to your flash drive. Return to Overview and select Back UP Now. The Deja Dup program will begin the initial backup of your Home folder.

Consequently, you will be prompted if you will like to type in an encryption password (NB: It is recommended you do so because it guarantees adequate security for your Raspberry Pi 4) .

Just type in a similar password in the Encryption password and confirm the password box before selecting Continue. The initial backup might take some time but it is largely dependent on the size of your Home folder.

Whenever Deja Dup has concluded the process of backing up your contents or files, you can now proceed to set up a schedule. Ensure the button that is initially deactivated is set to On. Select Scheduling and alter Week to Day.

Finally, the backup process will store the contents and files in your Home folder to the flash drive every day and it can be restored anytime you want.

How to restore backup files on your Raspberry Pi 4

Perhaps your system fails and you have to clear your entire SD card, you will have to reinstall the Deja Dup program and adhere to the instructions made while backing up your files.

Ensure your backup flash drive is joined to your Raspberry Pi 4 before launching Accessories and Backups.

Select Restore if you want to reinstall any missing or unfound directories or files. Be patient because another window will be launched if you want to install it from a new Raspbian image. Select your flash drive with the backup location and tap Forward.

Also, endeavor to select the date for the backup and tap Forward . At this point, you will be provided with two options namely: restore files to the original locations or restore files to a specific folder. You are expected to go with the option that reads "restore files to their original location", and then select Forward and Restore.

If you had typed in a password, you need to enter it once more in the Encryption Password box and select Continue .

The entire files from the Home folder in your former backup will be restored. In the end, you will see "Restore Finished" and expect that your entire files are now with you. Tap Close and look to see that your entire directories and files from your Home folder have been successfully reinstalled.

CHAPTER SEVENTEEN

What is a GPIO header?

The GPIO header is an important feature of the Raspberry Pi. It is an acronym for General Purpose Input/Output. The GPIO header is usually situated along the upper edge of the board.

Additionally, any GPIO pins can be placed as an input or output pin and utilized for several purposes.

Installing Raspberry Pi desktop on Mac or PC

Users are advised to install the Raspberry Pi desktop on their PC and Mac to get the best Raspberry Pi experience. Installing the Raspberry Pi desktop is also a perfect way to ensure you are using an old PC that cannot download or run the latest version of macOS or Windows.

Furthermore, the Raspberry Pi desktop has several software tools that allow you to start using digital making and coding. Before we get started, it is important to note that installing Raspberry Pi desktop on your Mac or PC will delete the entire data on your PC (NB: So, ensure you back up the most important content or file you will use at a later time before installing the Raspberry Pi desktop) .

The first step to installing the Raspberry Pi desktop on your Mac or PC is to download Raspberry Pi Desktop. Follow the steps below to accomplish this process:

1. Find your way to the Raspberry Pi Desktop website and look for the download button (NB: The download button is often represented by the "Download ISO button") .

2. Since the Raspberry Pi Desktop file is very large, the download process will take some time, so you need to be patient enough while the downloading process is ongoing (NB: It is also recommended that you use a high-speed internet connection for the download process to be fast) .

3. After a successful download, proceed to save the .iso installation file on your PC or Mac (NB: Ensure you learn and remember the location where you save the files because it is going to be needed in subsequent steps) .

4. The next requires you to create a USB drive installer. Additionally, the installer represents the USB drive that hoards your entire installation files needed to set up your PC using Raspberry Pi Desktop. From there, you will be allowed to utilize your installer several times to install the Raspberry Pi Desktop on several PCs.

5. Note that setting up a USB drive as an installer will remove your entire saved files on the USB drive. (NB: Also ensure you backed up the files you want to use in the next step) .

6. Proceed to insert the USB drive into your PC and launch the Etcher program to write the Raspberry Pi Desktop installation to the USB drive.

7. While in Etcher, select the Image option .

8. In the subsequent window, click the Raspberry Pi Desktop ISO file you earlier downloaded and select Open .

9. Choose the right USB drive, meanwhile, if you decide to change the USB drive you have earlier selected, simply click Change (NB: Make sure you choose the right USB drive because choosing the wrong one and moving to the next step will mean that the entire files in the drive will be erased) .

10. Select Flash to write the Raspberry Pi Desktop image to your USB drive.

11. At this point, Etcher will reveal "Starting", and also display the Flashing percentage.

12. Once the above process is completed, a message will pop-up on your screen and it will read "Flash Complete.

13. The next step also needs you to boot from the USB drive. If you want to install the Raspberry Pi Desktop from your USB drive installer, you have to first boot your PC from the USB drive (NB: Do not forget that installing the Raspberry pi Desktop will erase your entire data on your PC, so ensure that you have backed up the entire data you want to use) .

14. To boot from the USB drive, you have to hit a key on your keyboard while the PC is still booting to launch the boot menu and choose USB (NB: Be aware that the key you hit on your keyboard is dependent on the model of your PC) .

15. Proceed to insert the USB drive installer into your PC.

16. Switch on your PC and while the PC is booting, hit the boot menu key and press it several times until the menu is displayed on your screen.

17. Choose your USB drive (NB: It may look like USB-HDD) , then hit Enter on your keyboard.

18. Now, you have gotten to the step where you need to install the Raspberry Pi Desktop on your Mac or PC. Once you have successfully booted from your USB drive installer, the Debian installation menu will be displayed on your screen.

19. From there, simply choose Graphical install from the Debian GNU/Linux menu (NB: If you fail or ignore choosing Graphical install, the installer will begin using the default choice. If you are guilty of this, simply turn off your PC, reboot it, and boot once more from the USB drive).

20. Choose your keyboard type and select Continue.

21. At this point, the installation process will commence and it will install media and inform you of the kind of hardware in it.

22. If you want to set how you would like to divide your hard disk, choose Guided –use the entire disk and press Continue.

23. Choose the disk you want to divide (NB: In most cases, you may have more than 1) .

24. If you want to set the partitioning scheme, choose All files in one partition and select Continue .

25. Verify that you want to write the changes to the disk by clicking Yes and selecting Continue.

26. Be patient while the Debian OS installation process will commence.

27. Once the installation process is completed, select Continue and wait for some time, allowing your PC or Mac to automatically reboot and display the GNU GRUB boot screen.

28. Hit Enter to run Debian GNU/Linux .

29. As you have with the previous step where the installation process is completed, you are now free to safely eject the USB drive installer from your PC.

30. The final step requires you to start up your Raspberry Pi. Check out the steps below to start up your Raspberry Pi Desktop after installing it.

- Follow the Welcome to Raspberry Pi page and instructions.

- Select Next to begin the setup process.

- Choose your Language, Timezone, Country and select Next .

- Type in a new password for your Raspberry Pi and select Next.

- Proceed to connect to your Wi-Fi network by clicking the name and typing in the password before selecting Next (NB: In a case whereby your PC is without wireless connectivity like Wi-Fi, the option won't be displayed on your screen) .

- Select Next to allow the app to check for updates on Raspberry Pi Desktop and if there is any at all, you are expected to give it some time to install it.

- After installing the available updates, select Done or go on to reboot to complete the setup process (NB: You are only expected to reboot your PC if there is an update for the downloaded update that needs to take effect on your PC or Mac) .

- There you have it, your Raspberry Pi Desktop is now installed and can be used on your PC or Mac.

How to set up a Minecraft game server

Before we get started, Minecraft is one of the most played games worldwide and it is also addictive for a majority of gamers. Raspberry Pi users can set up their personal Minecraft server and enjoy the game with friends and family members. This is an alternative to spending large sums of money to buying a gaming PC. Although the graphics of the Minecraft game server is not all that encouraging, it is still an exciting game to engage in.

In just one hour, you can begin playing Minecraft on your Raspberry Pi 4. Take a look at some of the requirements needed to set up a Minecraft game server on your Raspberry Pi:

- LAN cable

- Raspberry Pi 4

- Power adaptor

For this project, you are expected to use an External Monitor with an HDMI cable to connect your Raspberry Pi. Meanwhile, if you are without a monitor, you can utilize a VNC server or SSH client to connect to a Raspberry with a PC.

Adhere to the steps below to set up a Minecraft server on your Raspberry Pi 4:

1. Update your Raspberry Pi

The first step needs you to upgrade and update your Raspberry Pi to the latest version with the below command:

2. Set up your surrounding

Since Minecraft is effective on Java, you are also expected to check if the Java compiler is already installed on your Raspberry Pi by following the below commands:

In certain instances, your Java version might be different (NB: But if your version is not displaying, you need to install Java SDK) .

3. Install Minecraft

The next step is to install Spigot Minecraft Server (NB: This is because it is an optimized plugin for small Minecraft servers) . The steps below show the process of installing Minecraft:

- Create the Minecraft folder by following the command:

- Download the build tools by entering the below command:

- Build the server package that you earlier downloaded with the below command:

NOTE: It takes a maximum of two hours to complete building the above files and the speed of building the files is dependent on the speed of your internet connection.

After a successful file building, you will see a file in your Minecraft folder with the name spigot-1.12.2.jar .

4. Open the Minecraft server

Now is the perfect time to open the server. Ensure you use the Is command to locate the spigot.jar file. The file should name that looks more like spigot-(the version).jar.

The steps include:

- Open the server with the below command and ensure the version number you input is the right one:

- Once you are done opening the server, the server will stop automatically to verify the license agreement.

- Launch the end-user license agreement with the below command:

Ensure you accept EULA by altering False to True and hitting CTRL and X to save and close.

- Subsequently, open the serve once more with the similar command:

This process might take a while up to 30 minutes.

5. Connect to the Raspberry Pi Minecraft Server

At this point, your Minecraft server will be online on your local network. Here, you have to open Minecraft on your PC, select Play, Servers, and Add Sever. Enter the new server details, provide a name, and include the IP address.

You can easily locate the IP address of your server by entering the outlined commands in the terminal: sudo hostname –I

Proceed to choose the sever to begin playing.

Perhaps, if you with other Raspberry Pi devices, you can choose to play them too (NB: Raspberry Pi features a built-in Minecraft game, this means you can connect the local Minecraft to the newly formed Minecraft server) .

CHAPTER EIGHTEEN

How to print with the Raspberry Pi 4

Before you begin printing with the Raspberry Pi4, you need to install CUPS. CUPS is referred to as an open-source printing system that utilizes the Internet Printing Protocol to make for printing on local and network printers.

Follow the steps below to successfully install CUPS

1. To install CUPS, you are expected to launch a terminal window by following the below commands:

2. Depending on the kind of broadband connection you have, the installation process might take some time. Once the installation process is complete, you have to give the Pi user administrative rights on CUPS. You can do this by returning to your console and entering the following commands and making the Pi user among the Ipadmin group:

3. The next step requires you to add a printer. To do this, launch your browser and move to https://localhost:31. After that, you will get a security warning from your browser. While this is so, press the Advanced button and continue to localhost.

4. On the next screen, you will be given the CUPS interface. Simply select Administration in the upper bar and you will find a drop-down menu. Proceed to authorize yourself to CUPS representing the Pi user, which was previously included in the administrator group.

5. After authorizing yourself, select the Add Printer option. From there, CUPS will search for a locally connected printer and other network printers on the home network.

6. In most printers, you will be given varieties of options. So, depending on the kind of printer in your possession, you may have to adhere to the procedures of adding a printer severally to know the best way to connect.

7. Subsequently, you need to test the printer after connecting it successfully. To do so, proceed to launch LibreOffice Writer and type in some test text.

8. Go ahead to select File and Print in the LibreOffice Writer menu.

9. If there is no issue at all, your printer should begin making the right printing noises and will begin printing your test document.

How to create a Twitter bot using Raspberry Pi 4

You can create a Twitter bot on your Raspberry Pi 4 by using a Twython package. The created twitter bot can serve different functions for you like automating several tasks and posting pictures whenever you want.

Tools and equipment needed:

- Raspberry Pi 4

- Power supply

- Wi-Fi dongle or Ethernet cord

- MicroSD card

- Raspberry Pi case.

Instructions on how to make a Twitter bot using Raspberry Pi 4:

1. To operate the Twitter API, you need to, first of all, register your account on the Twitter app (NB: The API will permit you to use the REST interface) . Simply log in to your Twitter account, and focus on the Website, Name, and Description. Leave the Callback URL empty and select the option to Create your Twitter Application.

2. Once done with creating your Twitter application, you will be redirected to the page that reads "Our Pi Test App" and select the "Keys and Access Tokens" option.

3. While on this page, you need to copy the Consumer Key and Consumer Secret because they are both needed to connect to the Twitter API (NB: Ensure you do not touch the Owner and Owner ID page because it is not needed to communicate with the API) .

4. Once done with copying the above values, select the option that reads "Create my access token" and the page will refresh once more. Navigate down to the lower part of the page and copy the Access Token Secret and the Access Token (NB: They are important values to setting up Raspberry Pi 4 Twitter Bot) .

Now, we have gotten to the stage where we are to set up and write the Twitter Bot for the Raspberry Pi 4. The stages include:

1. First of all, ensure your Raspberry Pi 4 is updated.

2. If it is updated, proceed to install the tools you will be needed to set up Raspberry Pi 4 Twitter Bot. In this step, you will need to use the Python package twython to communicate with Twitter's API. The following commands allow you to install the Python package twython.

3. The next step requires you to start writing the Twitter Bot on your Raspberry Pi 4. The step to do this is easy and you need to create a directory where you need to store your script and start writing the script by running the below commands.

4. When you get to this file, you need to write some code. The codes and their meaning are outlined below.

- Import sys – This imports the sys library which is needed to hold the system arguments that are sent to the script.

- Twython import Twython – This is needed to make API calls to Twitter. Furthermore, it also makes the Python script easy to read.

The subsequent block of code gives meaning to other important keys you wrote at the beginning of this procedure. Before we proceed, ensure you substitute the values of

Next, you have to give meaning to the variable API which keeps the Twython object. It is created with the entire consumer and access keys. Then you need to give a update_status API call to the API object (NB: This helps in tweeting any text that is given in the script to your Twitter account) .

The codes are outlined below:

After writing the required code, ensure you save the file by hitting CTRL + X and Y before pressing Enter .

5. After the Twitter Bot script has been successfully written, you have to make sure the script is executable so that you can send or deliver the text by moving it to the Python file as an argument.

6. Proceed to test the Twitter Bot script by running the below commands. This will verify that we are creating a real connection with the Twitter API and make sure we have written the correct thing. The command can be found below.

7. Finally, after confirming that the tweet was delivered without any problem, you can try out other things with the newly created Twitter Bot.

CHAPTER NINETEEN

How to flash an LED light

LED is referred to as a light-emitting diode that can be made to flash. Asides from the LED blinking manually, it can also blink automatically. Notwithstanding the method you decide to use to make your LED flash, you also have to get other electronic parts. For example, when making a simple design, you need to get a manual switch.

Follow the steps below to flash an LED light:

1. First of all, connect a toggle switch with your LED and proceed to also connect the anode of the LED to the left-hand side of the switch connection terminal and finally connect the cathode of the LED to the right-hand side of the connection terminal (NB: Do not forget that a toggle switch is controlled by a push-button and whenever the button is pushed, a metal wire is positioned across or removed from the two terminal connections of the switch.

2. Ensure you calculate the limiting resistor value for the LED. If the LED you are operating needs 2 Volts to make it flash then the electrical current to give light to the LED will be at 30 milliamperes. Do not forget that a 5 Volt battery power is needed to make the LED circuit blink. Take away the battery voltage from the needed LED voltage to get 3. Subsequently, divide the outcome 3 by the LED current needed. Your outcome will result in 100 ohms.

3. The next step requires you to connect the parallel switch made in the first step with your battery and the present limiting resistor. Now, connect the positive terminal of your battery to a particular end of the 100-ohm resistor. Subsequently, connect the other part of the 100-ohm resistor to the parallel switch. Finally, also connect the resistor to the anode of the LED lead before connecting the other part of the parallel switch to the negative terminal of the power supply.

4. The final step requires you to test your circuit. You can do so by turning on your battery and hitting the toggle switch. Keep on pressing the toggle switch and check that the LED will turn on and off whenever you press the toggle switch.

How to use a PIR sensor

The PIR sensor is an acronym for Passive Infrared Motion Sensor. They are mostly used in burglar alarm systems.

Whenever the temperature of an object is over zero, it brings about infrared radiation. Furthermore, infrared wavelengths cannot be seen by the human eye, but they can be seen by the electronics found in a PIR sensor.

More so, the sensor is passive because it fails to send any signal to notice movement. It simply works by adjusting itself to the infrared signature of the room and wait for changes to be made.

In a few PIR sensors, the pins are so clear on the circuit board. In others, their pins are placed below their cap. If your pins are placed under the cap, slowly remove the cap, allowing you to see the pins.

With three female to female jumper cables, proceed to connect each of the PIR sensor's pins to the right pins on the Raspberry Pi. Here are the steps:

1. Connect the PIR sensor's pin with the name VCC to the 5V pin on the Raspberry Pi (NB: This action will give power to the PIR sensor) .

2. Proceed to connect the GND to the ground pin on the Raspberry Pi (NB: As a matter of fact, this will bring to a conclusion, the circuit) .

3. Also connect the OUT pin to any of the GPIO pins on the Raspberry Pi (NB: This action will send out voltage to the Raspberry Pi) .

CHAPTER TWENTY

How to use a light-dependent resistor

Most of the outdoor and street lights are usually run and operated manually. Meanwhile, it is not only dangerous, but it also results in wastage of power because of the carelessness of individuals controlling the electrical appliances either On or Off. As a result, you can use a light sensor circuit for automatic switch Off the loads depending on the daylight by using a light sensor.

So, what does a light-dependent resistor mean? A light-dependent resistor can be referred to as a photoresistor, photoconductor, and photocell. It is also a type of resistor that has varying resistance depending on the number of light coming on its surface. In a case whereby the light falls on the resistor, there will be an alteration to the resistance.

Additionally, these resistors are mostly utilized in several circuits where it is needed to notice the presence of light. Furthermore, these resistors have numerous resistance and functions. For example, whenever the Light Dependent Resistor is dark, it can also be utilized to switch On light and switch Off a light. A common Light Dependent Resistor includes resistance in the dark of 1M0hm as well as a brightness resistance rising to K0hm.

How does a light-dependent resistor work?

The Light Dependent Resistor works on the principle of photoconductivity. It does not mean anything but whenever the light falls on its surface, the material conductivity will lessen and the electrons in the valence band of the device will move to the conduction band.

More so, these photons seen in the incident light need to have energy much higher than the bandgap of the semiconductor material. As a result, it makes the electrons emerge from the valence band to conduction.

The known devices depend on light and whenever light falls on the Light Dependent Resistor, then the resistance will lessen and there will be an increase in the dark, If you keep a Light Dependent Resistor in the dark, the resistance will become higher and whenever the Light Dependent Resistor is in the light, the resistance will reduce.

For instance, assuming a constant "V" is given to the Light Dependent Resistor, the intensity of the light will become high and the current will rise.

Check out the different types of Light Dependent Resistors below:

- Intrinsic Photo Resistors

The intrinsic photoresistors are majorly semiconductor devices such as germanium or silicon. Whenever the light falls on the Light Dependent Resistor, then the electrons will change from the valence band to the conduction band and the amount of charge it takes along.

- Extrinsic Photo Resistors

The extrinsic photoresistors are filled with impurities and they form a new energy band on the top of the valence band. As a result, the bands contain electrons. Therefore it reduces the bandgap and a little amount of energy is needed to move them. Finally, these resistors are mostly utilized for long wavelengths.

Applications of the Light Dependent Resistor

Light Dependent Resistors are not priced so much and they have an easy structure. Going further, these resistors are mostly utilized as light sensors. Also, the resistors are majorly utilized whenever you need to notice the presence and absence of light like an alarm clock, light intensity meters, burglar alarm circuits, and others. Light Dependent Resistors are used in several electrical and electronic projects.

CONCLUSION

Conclusively, we hope that this user guide has taught you everything there is to know about Raspberry Pi 4. If you are still having any issues as regards operating or using some functions in the Raspberry Pi 4 user guide, we urge you to refer back to this user guide.

Like mentioned earlier, the Raspberry Pi 4 is the newest version of the Pi models and it is a powerful small device designed for building robots, projects, and other things. It is also a fast device that costs less than other PCs. In this user guide, we discussed the requirements needed to use the Raspberry Pi 4 and the process of setting it up.

Asides from the listed functions, this user guide also discussed the required Raspberry Pi 4 storage space, its CPU, and the process of installing Python 3 and Windows 10. There are a whole lot of features, functions, and things to learn from the Raspberry Pi 4 user guide.

Table of Contents

INTRODUCTION...............................................................................................

CHAPTER ONE.................................................................................................

Requirements to use Raspberry Pi 4................................................................

How to set up Raspberry Pi 4........................................................................

CHAPTER TWO.................................................................................................

Raspberry Pi 4 Hardware Configuration..........................................................

Raspberry Pi 4 Storage..................................................................................

Raspberry Pi 4 CPU.......................................................................................

CHAPTER THREE.............................................................................................

How to control Raspberry Pi from anywhere...................................................

How to install Ubuntu desktop on Raspberry Pi 4.........................................

CHAPTER FOUR...............................................................................................

How to install python3 on Raspberry Pi 4........................................................

How to set up several LINUX users...............................................................

CHAPTER FIVE.................................................................................................

How to install Windows 10 on Raspberry Pi 4..................................................

How to open the terminal on Raspberry Pi 4.................................................

How to update Raspberry Pi 4.......................................................................

CHAPTER SIX...................................................................................................

How to take a screenshot on Raspberry Pi 4....................................................

How to take screenshots on Raspberry Pi 4 using Scrot and PrtSrc.............

Update from Jessie to Stretch........................................................................

CHAPTER SEVEN.............................................................................................

How to install software.....................................................................................

Update your Raspberry Pi for Scratch 2.0.....................................................

How to set up the sound on Raspberry Pi 4...................................................

CHAPTER EIGHT..............................................................................................

The Raspberry Pi 4 Camera Module.................................................................

How to connect the Camera Module.............................................................

How to connect to the internet using Raspberry Pi 4....................................

What makes the Raspberry Pi 4 special?.......................................................

CHAPTER NINE................................................................................................

Building Pi Web Server.....................................................................................

Building Pi Home security system.................................................................

PIR motion sensor..........................................................................................

CHAPTER TEN..................................................................................................

Building Raspberry Pi Jukebox.........................................................................

Install the latest Raspbian on the Raspberry Pi 4..........................................

Hook up your display.....................................................................................

Share your PC's music library.......................................................................

Install and Configure MPD............................................................................

Set up Music Library.....................................................................................

Configure USB Drive Access and Networking...............................................

Install Jukebox and use it...............................................................................

CHAPTER ELEVEN...........................................................................................

Building Pi 4 Touchscreen Tablet.....................................................................

Raspberry Pi Boot Problems..........................................................................

Probable solution...........................................................................................

CHAPTER TWELVE..........................................................................................

NOOBS OS Still on Splash Screen. What To Do?.............................................

The proffered solution...................................................................................

Not able to access Raspberry Pi over SSH, What to do?...............................

The board turns off sporadically, what can you do?......................................

CHAPTER THIRTEEN.......................................................................................

USB not working perfectly...............................................................................

Keyboard character showing errors in Raspberry Pi 4..................................

Raspberry Pi 4 Camera not functioning well.................................................

CHAPTER FOURTEEN......................................................................................

Raspberry Pi 4 not functioning well with an HDMI based display...................

Raspberry Pi 4 SD Card issues......................................................................

Ethernet on Wi-Fi Off.....................................................................................

CHAPTER FIFTEEN..........................................................................................

Attempting to alter password hangs in the Raspberry Pi 4..............................

Setting up a circuit on Raspberry Pi 4...........................................................

CHAPTER SIXTEEN..........................................................................................

How to backup..................................................................................................

How to restore backup files on your Raspberry Pi 4.....................................

CHAPTER SEVENTEEN....................................................................................

What is a GPIO header?....................................................................................

Installing Raspberry Pi desktop on Mac or PC..............................................

How to set up a Minecraft game server........................................................

CHAPTER EIGHTEEN.......................................................................................

How to print with the Raspberry Pi 4...............................................................

How to create a Twitter bot using Raspberry Pi 4........................................

CHAPTER NINETEEN......................................................................................

How to flash an LED light.................................................................................

How to use a PIR sensor................................................................................

CHAPTER TWENTY..........................................................................................

How to use a light-dependent resistor..............................................................

How does a light-dependent resistor work?..................................................

Applications of the Light Dependent Resistor...............................................

CONCLUSION..................................................................................................