Raspberry Pi 4
2020 Beginners Programming Guide
A Complete 2020 Manual to get started with Raspberry pi 4 Projects
Ted Humphrey
Copyright2020 Ted Humphrey
All rights reserved. No part of this book may be reproduced or used in any manner without the prior written permission of the copyright owner, except for the use of brief quotations in a book review.
While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein.
Printed on acid-free paper.
Printed in the United States of America
2020 by Ted Humphrey
Contents
CHAPTER ONE
INTRODUCTION TO RASPBERRY PI 4
How easier can it be to have a computer as small as the size of a credit card doing for us what most bigger and sophisticated computers can do while utilizing a lower power unit? The Raspberry pi is just like a computer where users can get to design and customize its interface for many user-defined functions and projects. Much like your computer, the Raspberry pi requires an operating system that enables it to carry out a number of tasks just like your everyday computers. The Raspberry pi models earlier designed were not intended to gain much popularity, but the little single-board computers were functioning and were accepted by programmers, students and collaborators all over the world. The popularity was born accredited to the fact that the Raspberry pi series were among the first computers of its kind to allow users to design what they want to use it for- ranging from programming, robotics, creating other physical devices, browse the web and play a number of sophisticated video games amidst other interesting uses. One thing about the Raspberry pi, just like any other computer, is that much hardware can be attached to it through the General Purpose Input-Output Pins (GPIO) attached to the side of the Raspberry pi. But unlike most computers, the hardware attached to the Raspberry pi can be used for a number of different purposes such as temperature control hardware, LEDs, switches and others such as robots, motion detection gadgets, drones etc. NASA once used the Raspberry pi 3, one of the generations of Raspberry pi, to power their open source Rover an indication that the Raspberry computers are applicable in space exploration.
The first model of the Raspberry pi, which is the Raspberry pi Model B launched in 2012, came with lesser features when compared to other models released afterwards. A good example is the Raspberry pi zero series which is a small and improved version of the much bigger sized Raspberry pi. The pi zero series came with better features such as the many USB ports and low power usage. Moving from the Raspberry zero series to the latest pi 4, the Raspberry pi series were observed to have a common feature which is that software for the pi zero can work with that of pi 4 only that it is slower.
The Raspberry Generations
Since 2012, when the first model of the Raspberry pi was released, the Raspberry inventors did not stop giving their users many extraordinary improvements, which are usually incorporated into the newest versions of the Raspberry. But the common thing about all the versions of Raspberry released till date is that they all feature; system on a chip (SoC) together with a powerfully integrated ARM -packed CPU and the on-chip graphics processing unit (GPU). The system on a chip (SoC) was designed by the Broadcom Company, which is the leading designer of multi-functional semiconductor devices and other software. The ARM is a reduced instruction set computing architecture (RISC) primarily made for computer processors. The on-chip graphics processing unit (GPU) is responsible, primarily, for image creation ability of the Raspberry pi. There is a secured digital ( SD) card which stores the Raspberrys operating system and all of its program memory.
- Raspberry pi Model B: this is the first model of the Raspberry series that came into the market in 2012. The Raspberry pi model B+, featuring an improved board design compared to the pi model B was released into the market in 2014.
- Raspberry pi 2: housed a 900 MHz ARM processor with 1 GiB RAM. The GiB (gibibyte) here differs slightly from GB (gigabyte). The pi 2 came into the market in February 2015. The earlier pi 2 model, which was the V1.1 model of the Raspberry Pi 2, utilized a Broadcom BCM2836 SoC with a 900 MHz 32-bit, ARM processor, with and a 256 KiB shared L2 cache. The later model, which was the Raspberry Pi 2 V1.2, was advanced to a Broadcom BCM2837 SoC featuring a 1.2 GHz 64-bit ARM A53 processor, the same SoC which is used on the Raspberry Pi 3, but underclocked (by default) to the exact 900 MHz CPU clock speed as the V1.1. The BCM2836 SoC went defunct as of late 2016.
- The Raspberry pi zero: The Raspberry pi zero was not exactly bigger as compared to the Raspberry pi 2 series. The pi zero also featured less input and output capabilities when compared with the Raspberry pi 2 series. The pi zero was released in November 2015. By February 2017, the company launched the pi zero W was released into the market, which featured a Wi-Fi and Bluetooth mode. About 10 months later, the pi zero WH was released into the market featuring a GPIO header. Both the Raspberry Pi Zero and Zero W feature 512 MiB of RAM. The pi zero, lacking any Ethernet circuit, is usually connected using an external Wi-Fi Adapter. A thorough look at the Pi Zero observed that the USB port is connected straight to the SoC, and that it deploys a micro USB (OTG) port. When compared to most other pi versions, the 40 pin GPIO connector is not available on the Pi Zero but the latter Pi Zero WH solves this.
- Raspberry pi 3 model B and B+: The pi 3 model B was launched into the market in February 2016. It featured a 1.2GHz 64 bit quad-core processor, a superb on-board 802.11n Wi-Fi, Bluetooth and USB boot modes. In 2018, the Raspberry Pi 3 Model B+ was released which featured a faster 1.4 GHz processor and an Ethernet or 2.4 / 5 GHz dual-band 802.11ac Wi-Fi (100 Mbit/s). It also came with a Power over Ethernet (PoE) (with the add-on Power over Ethernet HAT), USB boot and network boot (which makes an SD card a defunct feature in the pi model b+). The Raspberry Pi 3 Model B utilizes a Broadcom BCM2837 SoC featuring a 1.2 GHz 64-bit ARM A53 processor, with a 512 KiB shared L2 cache. The Model A+ and B+ are both 1.4 GHz ARM processors.
- Raspberry pi 4 model B: Released in the first half of 2019 featuring a 1.2GHz 64 bit quad-core processor, a superb on-board 802.11n Wi-Fi, Bluetooth 5, two USB 2.0 ports and two USB 3.0 ports, and a Micro HDMI port supporting a dual monitor display showing a 4k resolution. The Raspberry Pi 4 utilizes a Broadcom BCM2711 SoC featuring a 1.5 GHz 64-bit ARM A72 processor, with a 1MiB shared L2 cache. The Raspberry Pi 4 is available with 2, 4 or 8 GiB of RAM. The pi 4 model B initially came with a 1GiB model which became available on the launching day in June 2019 but the 1GiB model was discontinued in March 2020, and they later introduced the 8 GiB model in the month of May 2020.