Hello friends, I hope you all are doing great. Today, I am going to start a new tutorial series on Raspberry Pi 4. It's our first lecture today, so I will explain the basics of Raspberry Pi boards. In this tutorial series, I will teach you each and everything about Raspberry Pi and its programming. I have designed this guide for beginners, so we will start from the very basics and will slowly move towards complex concepts. As you must have some idea that Python programming language is used in Raspberry Pi boards, we will study python as well. So, we will learn both programming and hardware circuit designing in this tutorial series. So, let's first have a look at What is Raspberry Pi?
What is Raspberry Pi?
Raspberry Pi is a series of Single Board Computer, developed by the Raspberry Pi Foundation in England, to teach computer science in schools. When you buy the Raspberry Pi board, you only get the board. There are other components i.e. power adapter, HDMI cable and memory card etc. required to run the Raspberry Pi board. After these basic components are provided, the operating system must be installed on the Micro SD card.
A Single board computer(such as Raspberry Pi) is a computer that contains basic units i.e. ram memory, input-output unit, microprocessor but unlike normal computers, it is not possible to expand the hardware features. For example, it does not contain a SLOT to increase the RAM memory from 1GB to 2GB. Since Raspberry Pi is designed as a single board and does not have a structure open to development for extra hardware to be installed on it, its cost is quite low. Single-board computers are not used as personal computers but are used in engineering projects where heavy computing is required i.e. robotics, IoT, image processing etc.
Components such as memory, video card, network card, sound card on a single-board computer are usually integrated on-board. The operating system is installed on the Micro SD card. Pictured is the Dyna-micro MMD1, the first single-board computer produced in 1976.
Figure 1: DYNA-MICRO MMD1- First single board
There are many alternatives to Raspberry Pi i.e. Orange Pi, Banana Pi, Asus Tinker Board. When examined in terms of features, Raspberry Pi boards are more preferred thanks to the community support behind them, even if the hardware features of the alternatives are better.
The official operating system of the Raspberry Pi card is Raspberry Pi OS, but other operating systems can also be installed on Raspberry Pi boards.
Raspberry Pi 4 is the latest version and it allows the use of both 32-bit and 64-bit operating systems.
Figure 2: Raspberry pi os versions
Figure 3: Recommended 3rd party operating systems for raspberry pi
There is a processor with ARM architecture on the Raspberry Pi. The processor is based on the RISC(reduced instruction set computer) architecture developed by Advanced RISC Machines(ARM).
Figure 4: Raspberry pi 4 -4gb version
ARM-based processors are used in mobile devices, handheld terminals, mobile phones, media players, calculators, disk drives, VCDs, DVDs, cameras and even cars. To give a percentage, 75% of 32-bit processors in the world are ARM-based processors. The reason why this architecture is so preferred is the power saving, low cost and performance features of ARM-based processors.
Figure 5: The processor used in the Raspberry pi4 version is a BCM2711-ARm based processor.
The table shows the hardware comparison of all raspberry pi boards ever produced.
When you buy the Raspberry Pi card, a power adapter and Micro SD card are needed to run the card and load the operating system into it. For Raspberry Pi 3 and previous versions, the power adapter must be micro-USB compatible and at least 2 Amps and 5 Volts. For Raspberry Pi 4 and above versions, the power adapter must be USB-Type C and at least 2.5 Amps.
Figure 7: Raspberry pi 4 power adapter
Figure 8: While the USB-Type C connection shown on the left is used for Raspberry Pi 4, micro USB connection is used for previous version cards.
Figure 9A microSD card is needed to install an operating system. It is recommended to use a Class 10 type card.
In addition, in order to use the Raspberry Pi card, monitor - display, keyboard, mouse, HDMI cable for Pi 3 and previous versions, and micro HDMI cable for Pi 4 is required.
Where is the raspberry pi 4 used?
- Replace your desktop PC with a Raspberry Pi 4
- Print Server-Print with your raspberry pi
- Raspberry Pi Media Center
- Set up a Retro gaming machine
- Build a Minecraft game server
- Control a robot
- Build a stop motion camera
- Make a time lapse video
- Build a Raspberry Pi webserver
- Build a motion capture security system
- Digital photo frame
- Build a network monitoring tool
- A home automation system with Arduino
- Stream live video to youtube
- Create IoT projects
- Learn how to code( Python-c++-code blocks-)
- Build a smart mirror
- Bluetooth and Wifi Projects
- AI Projects
You can develop many projects with raspberry pi. Many parameters such as portability, ability to produce integrated solutions, ram memory, internet connection, processor speed are the strengths of raspberry pi.
Raspberry Pi OS Operating System Installation
Installing an operating system on the Raspberry Pi card to use it required. A minimum 8GB Micro SD card is required to install the Raspberry Pi OS operating system. https://www.raspberrypi.com/software/operating-systems/
You can install the 32-bit or 64-bit raspbian os operating system on the Raspberry pi card. Especially if you have the Raspberry pi 4 8GB version, it would be appropriate to choose 64 bit OS. Because with a 32-bit operating system, you can only use up to 4GB of the RAM memory of the raspberry pi.
Figure 10: Preferable operating systems for raspberry pi 4
In Raspberry Pi OS installation, the image file (iso extension) must be downloaded to the computer and installed on the micro SD card via Win32 Disk Imager or a program that does the same job. In this step, we will examine how to upload the image file to the microSD card.
A-Raspbian os installation steps with Raspberry pi imager
The first step is to download the appropriate version of the imager application for our operating system to the PC.
https://www.raspberrypi.com/software/ When we log in to the address, the imager application can be downloaded by clicking the "download for windows" button.
- When the imager application is run, the screen will appear as follows.
Figure 11Raspberry pi imager application screen
In the first step, the operating system selection button is clicked. Select the operating system from the pop-up window. Here I prefer Raspbian os 32 bit operating system. If you want, you can choose other operating systems that you can use for different purposes from this menu.
Figure 12: Choose OS secreen
If you want the operating system and all the applications that need to be installed on the raspberry pi, you can choose the Full version. For this, the Raspberry pi os (Other) tab is selected. Raspberry pi os Full tab is selected from the window that opens.
Figure 13: full version raspbian os 32 bit version selection
The settings button can be seen in the lower right corner of the opening screen. By clicking this button, we can change various settings that the raspberry pi will need during installation.
Figure 14: The required settings can be changed during installation using the settings button.
Many settings can be made, such as activating the SSH connection, wifi connection settings, entering the user name and password.
If you do not have hardware for raspberry pi at the time of installation, such as monitor, keyboard, mouse, it is enough that your raspberry pi and your personal computer are connected to the same network. ssh connection can be used for this purpose. Thanks to the wifi setting we will make in the settings section, we can provide a remote connection to the raspberry pi card, which is on the same network as your pc.
Figure 15: Setup settings window
2-Select microSD Card: Your microsd card must be formatted in fat32 format.
3-Write Button : All files in your selected microsd card will be deleted and after the work is finished, you will receive the operating system loaded.
B- Installation using iso file
In this section, the installation of the “Raspberry Pi OS with desktop and recommended software” version will be explained. In other versions, there are not some applications to be used as many packages have been removed to reduce the size. The MU Editor application will be used for programming the Raspberry Pi board. This application is only available in the "Raspberry Pi OS with desktop and recommended software" version. In addition, applications such as Scratch are only available in this version for the user to use.
For installation, the file must be downloaded and extracted from the compressed folder. Looking at the extracted file, it will be seen that the file is a mirror file.
Figure 16: Raspberry Pi disk image (ISO file)
After downloading your preferred iso file to your computer, you need a program that will allow you to install your operating system on your sd card. For this purpose, you can choose the win32 imager application. Download this application from https://win32diskimager.org/#download and install it on your computer.
Figure 17: Writing .img file to sd card.
After the image file is loaded on the SD card, the operating system can be started by inserting the SD card into the Raspberry Pi.