Introduction to Raspberry Pi and Setup
Raspberry Pi is a Single Board Computer. It provides desktop experience in a very small form factor. Pi Zero is 65mm x 30mm. Single board computers are making computing affordable for all walks of life
Pi Zero 2 W H shown above costs about 20$, if you add a monitor that costs about another 30$ along with a mouse and keyboard you will have a computing device for about 70$
It is not powerful as the regular desktop computers but it is a good starting point for beginners especially for school and college going kids to learn and understand how computers and electronics work. Pi Zero 2 W has the below processor, memory and wireless specifications
We will discuss about setting up Raspberry Pi Zero 2 W H
What do we need for this setup?
- Raspberry Pi Zero 2 W H (H indicates pre-soldered GPIO header)
- Raspberry Pi Pi3/Pi3B+ Micro USB 12.75W Power Supply
- Raspberry Pi Zero protective case
- SanDisk Ultra A1 Class 10 32GB Memory Card
- Micro SD Card Reader
- USB Hub
- Micro USB OTG to USB 2.0 Adapter
- HDMI Cable
- HDMI Female to Mini HDMI Male Adapter
Setting Up The Pi
The first step in setting up the Pi is to install the Operating System
This guide on the official site has detailed instructions on how to install the OS
Guide to installing OS on your Raspberry Pi
When you reach this step, to keep things simple, select Password Authentication
After you select Password Authentication, skip all other steps for now and proceed to below step
Once you complete all the steps, you will reach the final step
Click on Finish and we are done with OS installation for the Raspberry Pi
The OS is now installed on the Micro SD Card
We now have to start the Pi and do some customizations
Understanding Raspberry Pi Zero Pheripherals
On the extreme left is the Micro-SD Slot. We have to insert the SD Card with the OS installed
Insert the Card in to the slot with the labels on the card facing toward you and gently push it in
On the extreme right is the Camera Connector Slot also called the Camera Serial Interface. This is where we connect the camera module
Micro-USB Power port is for the power supply to the Pi
Micro-USB Data port is to connect a Mouse/Keyboard/any other USB device to the Pi
Mini-HDMI port is to connect the Pi to a display device like the TV or Monitor with HDMI port
GPIO (General Purpose IO) Header is to connect Input and Output devices/components to the Pi. There are 40 pins on the Pi Zero and all higher versions. In Pi Zero 2 W H, the headers are soldered and the devices/components can be connected to the pins with the help of jumper cables
Boot The Pi and Get Started
I have selected Waveshare protective case for enclosing the Pi. This case is convenient as all ports and connectors are accessible through openings in the case. If you intend to install the Pi outdoors where it is exposed to dust and moisture, it is important to enclose the Pi in a protective case
Mount the Pi in the case and close it. Now it is the time to power up the Pi. Connect the power supply to the Pi and it boots up
Next to the Micro-USB Power port is a small led that lights up and blinks continuously as the Pi boots
If it stops blinking and stays solid with a green light, it indicates the Pi has booted successfully
Connecting to the Pi Desktop
The Pi has booted and is now running. Usually Rasbperry Pi conects to the Wi-Fi we configured during the OS installation step. But when I booted, the Pi Zero did not connect to the Wi-Fi
If it connects to the Wi-Fi and we could grab the IP address of the Pi, we can SSH in to the Pi to access and configure it further
If it does not connect to the Wi-Fi, we have to connect the Pi to a TV or Monitor with a HDMI port. Use the HDMI Female to Mini HDMI Male Adapter. Connect your Pi to a TV or Monitor with a standard HDMI cable. Once connected, login to the Pi with the username and password configured during the OS installation step. Once logged in we should be able to see the desktop
Use the Micro USB OTG to USB 2.0 Adapter to connect to a Key Board and Mouse. To simultaneously connect the Mouse and the Key Board, you should connect the OTG adapter to a USB hub with multiple USB ports
Click on Wi-Fi configuration on the top right corner of your desktop. Configure and connect to your home Wi-Fi. If you plan to mount the Pi far away from your router, connecting to the 2.5 Ghz channel would help. It is a long range channel compared to 5 Ghz channel and it minimizes interference from walls and other obstacles between the Wi-Fi router and the Pi
Make note of the IP address assigned to the Pi. Mostly this remains constant even if you reboot and reconnect to the Wi-Fi. If you have administrative access to your home Wi-Fi router, configure a static IP for your Pi
Using this IP address, we can connect to the Pi from another computer in our home Wi-Fi network by SSH or RDP
We also have Bluetooth on Pi Zero. Bluetooth devices can be connected to the Pi
Customising the Pi
Previously, we accessed the Pi by connecting it to TV or Monitor. If you do not have a Laptop or Desktop, this is is the only way to connect to the Pi. If you have another computer, you can access the Pi by connecting it by Remote Desktop (RDP) or SSH (Secure Shell). RDP gives you access to Pi's Desktop, where as SSH gives you access to the command terminal on the Pi. In SSH mode you will be able to interact with the Pi only by executing commands on the command line interface. In RDP you can interact with the Pi through the desktop Graphical User Interface (GUI)
When we installed the OS, we configured a user to login to the Pi
SSH in to your Pi from another computer (Desktop or Laptop connected to your home Wi-Fi) for the next steps or continue to access Pi on your TV or Monitor. To SSH, use the user you configured when installing the OS. I am assuming admin is the user you created and your Pi IP Address to be 192.160.1.10
Execute
We shall create a new user piuser. Execute the below commands in the command terminal on your Pi
sudo adduser piuser
sudo usermod -aG video piuser
sudo usermod -aG render piuser
sudo usermod -aG audio piuser
sudo usermod -aG sudo piuser
The user piuser has now been added to the groups video, audio, render and sudo
We have to enable RDP. Execute the below commands in the command terminal on your Pi
sudo apt update
sudo apt install xrdp
sudo raspi-config
Navigate to Advanced Options and press Enter
Select A7 Wayland and press Enter
Select W1 X11 and press Enter
Select Finish and Reboot the system for the changes to take effect
With this we are done setting up the Pi
Let us hope and wish, single board computers like the Raspberry Pi remain affordable
No comments:
Post a Comment