Raspberry Pi
Tips and Tricks to Learn Raspberry Pi Programming
Copyright 2020 by Logan Pratt - All rights reserved.
This document is geared towards providing exact and reliable information in regards to the topic and issue covered. The publication is sold with the idea that the publisher is not required to render accounting, officially permitted or otherwise qualified services. If advice is necessary, legal or professional, a practiced individual in the profession should be ordered.
- From a Declaration of Principles which was accepted and approved equally by a Committee of the American Bar Association and a Committee of Publishers and Associations.
In no way is it legal to reproduce, duplicate, or transmit any part of this document in either electronic means or printed format. Recording of this publication is strictly prohibited, and any storage of this document is not allowed unless with writ10 permission from the publisher. All rights reserved.
The information provided herein is stated to be truthful and consis10t, in that any liability, in terms of inat10tion or otherwise, by any usage or abuse of any policies, processes, or directions contained within is the solitary and utter responsibility of the recipient reader. Under no circumstances will any legal responsibility or blame be held against the publisher for any reparation, damages, or monetary loss due to the information herein, either directly or indirectly.
Respective authors own all copyrights not held by the publisher.
The information herein is offered for informational purposes solely and is universal as so. The presentation of the information is without a contract or any type of guarantee assurance.
The trademarks that are used are without any consent, and the publication of the trademark is without permission or backing by the trademark owner. All trademarks and brands within this book are for clarifying purposes only and are owned by the owners themselves, not affiliated with this document.
Table of Contents
Chapter 1: Basics of Raspberry Pi
Introduction to Raspberry Pi
Raspberry Pi is a powerful device, an independent computer, and is sold at a highly competitive and affordable price. Raspberry Pi will support you in playing games, browsing the internet, learning to program, or creating your own physical devices. In this guide you will find step by step instructions for performing all these activities.
Raspberry Pi is a one-point computer; therefore, it is built on one single PCB. It will work like a computer, laptop, or smartphone. It is very small in size, like a credit card, and is powerful enough to compete with other similar devices. It can perform high functionality tasks like a computer does, but maybe not that much quicker.
The Raspberry Pi boards are used worldwide in offices, classrooms, data centers, homes, self-control boats, and small factories.
The first model released for the Raspberry Pi was model B. After that, there was no stopping it and many other models have been released to provide specific features or specifications for different use cases. For example, the Zero family of Raspberry Pi, which is a micro version of the complete Raspberry Pi, has dropped certain features such as wired network port and multiple USB options to have a small layout. This is particularly useful for those who need fewer power loads.
There is one thing common in all the Raspberry Pi models. They are compatible with each other, which means the programming software for a particular model will also run on any Raspberry Pi model. It works vice versa also;, you can have the latest operating system and then run it on the old prototype model. It will be a bit slow, but still, it will surely run. So that's the power of Raspberry Pi.
In this book, you will be focusing on the latest Raspberry Pi Model B+, which is also the most powerful version launched to date. Whatever you will learn here will also apply to other models. Thus you don't need to worry if you are working on a different model.
The Basics of Raspberry Pi
A computer hides all its working inside a case, but all components of Raspberry Pi can be seen, such as ports, wires, features, etc. If you prefer, you can buy a case from the market to have extra protection. This will help you to understand how exactly the parts of computer work. It will be interesting to learn how the peripherals work when connected with the PCB.
Pi 3 Model B+
At first look, it may seem like there are plenty of things packed into a very small board, yet it is very easy to understand Raspberry Pi. The best way to understand is to start with its components and the internal processes that make the device work.
The Basic Components of Raspberry Pi
The Pi, similar to other computers, consists of over a dozen components. Every part plays its specific role in making it work. The most important parts are located on the top of the board. This important part is protected by a metal cap named SOC. If you remove the metal cover, you will find a silicon chip, well known as an integrated circuit. This chip carries the majority parts of Raspberry Pi's structure. The parts it carries include the CPU, also known as the central processing unit, and the GPU, which deals with graphics and visual aspects of Raspberry Pi.
Figure 1: Raspberry Pi Board
RAM and SD Card
A brain without sufficient memory is of no use. In the base of the Raspberry Pi, one can see a small plastic chip, which is known as Pis RAM or random access memory. Whatever you do on your computer is controlled by the RAM. However, when you save your work, it goes to a micro SD card. The RAM forms the volatile memory of Raspberry Pi while the SD card forms its non-volatile memory. Things stored in RAM are short-lived; therefore, when you turn off your computer, it loses all its memory. On the other hand, the SD card will store things forever.
Radio
After turning the board sidewise of Raspberry Pi, you will find its radio covers in the metal lid on the upper side of it. The function of the radio is to enable Raspberry Pi to communicate with other devices without a wire. This radio can be divided into two types; the first type of radio named Wi-Fi radio is used to connect Raspberry Pi with other computer devices. The 2 nd type of radio is Bluetooth radio, which is used to connect with nearby devices to share and receive data.
USB Controller and PMIC
The next component of a Raspberry Pi computer is a network and USB controller. It is located on the bottom side of the board. This component controls the Ethernet port and 4 USB ports. On the upper side of this USB controller is located PMIC, also known as power management integrated circuit. Its function is to convert the power received from the USB port into the power required by the Pi to function.
The Types of Ports Used in Raspberry Pi
There is more than one type of port used in Raspberry Pi. The first and most prominent type is USB port that is normally four in number. These USBs are also known as USB 2.0 ports because they consist of 2 nd version of USB (universal standard bus). These USB ports are useful for all types of USB compatible devices, including flash devices, mice, keyboards, etc. When you look towards the left side of these ports, you'll find the Ethernet port, which is used to connect Raspberry Pi with a wired computer network. If you look at this Ethernet port, you can see two status LEDs which convey the message if you are connected to a working network or not.