FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

MuhammadRaheelNaseem/Learn_Raspberry_Pi_Programming: Explore the Raspberry Pi Learning Repository on GitHub for comprehensive resources and projects. Learn, create, and join the community to unleash your potential with this versatile single-board computer. Happy Raspberry Pi learning! · GitHub

Repository files navigation

IoT (Internet Of Things)

Raspberry Pi 4

What is Raspberry Pi

The Raspberry Pi is a low-cost, credit-card-sized computer that plugs into a computer monitor or TV, and uses a standard keyboard and mouse.

Raspberry Pi is a series of small single-board computers developed in the United Kingdom by the Raspberry Pi Foundation in association with Broadcom. The Raspberry Pi project originally leaned towards the promotion of teaching basic computer science in schools and in developing countries.

What is a Raspberry Pi used for?

All over the world, people use Raspberry Pi to learn programming skills, build hardware projects, do home automation, implement Kubernetes clusters and Edge computing, and even use them in industrial applications.

Difference Between Raspberry pi and Arduino:

Raspberry Pi:

  1. Linux
  2. Can't be developed seperately
  3. sd card (only class 10) minimun memory 16gb or maximum 1tb
  4. 1 GH processor
  5. 1gb, 2gb, 4gb, 8gb or 16gb RAM
  6. Display HDMI/TFT/IPS
  7. Mouse / keyboard
  8. 40 Pins (GPIO -> General Purpose Input Output)
  9. WiFi Bult-in
  10. Bluetooth 2.0/4.0
  11. PiCamera
  12. 3.5 mm AudioJack
  13. 7+ Languages Support
  14. 5volt 3amp only
  15. LAN Port
  16. Own Operating System

Arduino:

  1. No Linux
  2. custom mode
  3. no hard disk / no memory
  4. 11.05 MHz
  5. No RAM
  6. No display
  7. No mouse / keyboard
  8. no USB port
  9. 16 Pins
  10. No WiFi
  11. No Bluetooth
  12. No port
  13. no speaker
  14. 1 language (only C++)
  15. power (2 way)
  16. No LAN
  17. No Operating System

Let's Start The Journey Of Raspberry Pi:

Make prepare of Raspberry Pi

Requirments:

1.) SD Card:

make sure class 10 symbol is here

Software Name:

1.) Sdcard Formater

go to this link and download it: https://sd-card-formatter.en.uptodown.com/windows

Formatting and Flashing SD Cards

Downloading and Installation of Raspberry pi Imager Through the Internet

Raspberry Pi Imager is free to install from the official Raspberry Pi website. It is under the download page section of the website. It's available for MacOS, Windows, Linux, and Ubuntu systems.

Visit the Raspberry Pi Software section (https://www.raspberrypi.com/software/)

1. Download the latest version of the Raspberry Pi Imager installer for your Operating System.

2. Run the installer and follow the prompts to complete the setup.

3. Once the raspberry pi file installs successfully now open with from Windows start menu.

Steps to Follow to install pre-defined Images

1. Launch Raspberry Pi Imager.

2. Click Choose OS and choose Raspberry Pi OS.

3. Click Choose SD card.

4. Select from the list the SD card you want to write to.

5. Click the setting icon and apply some configuration.

6. Setting up some configuration

7. Now click the write button

8. Then click Yes button

7. Now it is verifying

Manual Downloading and Installation Raspberry Pi OS

Raspberry Pi Imager is free to install from the official Raspberry Pi website. It is under the download page section of the website. It's available for MacOS, Windows, Linux, and Ubuntu systems.

Visit the Raspberry Pi Software section (https://www.raspberrypi.com/software/)

1. Download the latest version of the Raspberry Pi Imager installer for your Operating System.

2. Scroll down and click download options

3. Goto this link https://www.raspberrypi.com/software/operating-systems/, scroll down and download Raspbian buster OS

4. Extract the zip file, you will get img file for raspbian buster

5. Now open the Raspberry pi Imager for manually OS image file writing.

Steps to Follow to install pre-defined Images

1. Launch Raspberry Pi Imager.

2. Click Choose OS and choose custom Os image file.

3. Click Choose SD card.

4. Select from the list the SD card you want to write to.

5. Click the setting icon and apply some configuration.

6. Setting up some configuration

7. Now click write button

8. Then click yes button

9. Now it is verifying

Manual Installation with Win32 Disk Imager

Go to the link and download https://sourceforge.net/projects/win32diskimager/files/latest/download?source=navbar

Downloading will be started automatically After the installation it will look like this

download

If win32 disk imager doesn't work then download this software for OS writting

go to this link and download https://www.balena.io/etcher/

3.) Balena Etcher

Now Insert your Memory card in Raspberry Pi:

Connect to power cable:

Now you can see what Raspberry Pi looks like:

Now lets operates Raspberry Pi:

Click Terminal:

Command 1:

What is Sudo?

superuser do or substitute user do

sudo , which is an acronym for superuser do or substitute user do, is a command that runs an elevated prompt without a need to change your identity. Depending on your settings in the /etc/sudoers file, you can issue single commands as root or as another user.

OR

sudo is a program for Unix-like computer operating systems that enables users to run programs with the security privileges of another user, by default the superuser.

Command 2:

How to Connect Raspberry Pi to internet?

pi@raspberrypi:~ $ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

network={ ssid="wifiName_1" psk="wifiPassword" }

network={ ssid="wifiName_2" psk="wifiPassword" }

Then click Ctrl+x

Then click Y it will be saved!
Now you can see you have successfully connected into your wifi router

Now Let's Configure Raspberry Pi with the help terminal

Then Enter

Goto to 3rd option interface Options
Then Click

Now can see Interface option

Then click

![download](https://user-images.githubusercontent.com/63813881/172047163-018ddfab-1f02-41d2-a203-c101b5b9b6ac.png)

Use Arrow button left and right
press select button then Enter

If it will ask you then select YES button then click now your SSH will be enable!

![download](https://user-images.githubusercontent.com/63813881/172047177-01d252a0-8d18-4804-b3e6-9124e814e5b4.png)

Then press OK

Then now enable all the thing by previous method

Use Arrow button left and right
select finish button then Enter

After the click! It's mean you have configure all interface options

Command 3:

After the setting!
Before starting working first you have to Update or Upgrade your Raspberry OS by this command
First Update then upgrade

1.) sudo apt-get update
2.) sudo apt-get upgrade

type: sudo apt-get update

after the update type: sudo apt-get upgrade

after some second it will ask you Do You Want Continue [Y/N]
type y

Then Enter

Your raspberry pi is update or upgrade successfully

Command 4 Restart Your Raspberry Pi

pi@raspberrypi:~ $ sudo reboot

Command 5 Shutdown Your Raspberry Pi

pi@raspberrypi:~ $ sudo poweroff

pi@raspberrypi:~ $ sudo shutdown -h now

Command 5 List directory

pi@raspberrypi:~ $ ls

Command 6 Nmap Scan the Local Network

pi@raspberrypi:~ $ sudo apt-get install nmap
then click y it will start installation

pi@raspberrypi:~ $ nmap -sn 192.168.1.0/24

Command 7 View Background Task

pi@raspberrypi:~ $ htop

Command 8 Find the IP Address of Raspberry Pi

pi@raspberrypi:~ $ hostname -I

Command 9 Download a File

pi@raspberrypi:~ $ wget URL

Command 10 Check Raspberry OS Version

pi@raspberrypi:~ $ cat /proc/version

Command 11 Check Current Directory

pi@raspberrypi:~ $ pwd

Command 12 Create folder

pi@raspberrypi:~ $ mkdir folder_name

Command 13 Delete Folder

pi@raspberrypi:~ $ rm folder_name

or

pi@raspberrypi:~ $ rmdir folder_name

Command 14 Check Files by Extension

pi@raspberrypi:~ $ cat *.txt

If you want to sort files based on the file extension like TXT, PDF, etc., you can use the cat command. This command works like a charm on Raspberry Pi.

Command 15 Root Permission

pi@raspberrypi:~ $ sudo su


On Raspberry Pi, if you get the “Permission denied” output, it means you don’t have the privilege to modify or access that file. In such cases, you can type sudo su and hit enter to get into the elevated permission mode. Now, you can execute the command and won’t face any errors.

Now let's Configure with GUI (Graphical User Interface)


Click the Raspberry icon


You can control most of your Raspberry Pi’s settings, such as the password, through the Raspberry Pi Configuration application found in Preferences on the menu.

System

In this tab you can change basic system settings of your Raspberry Pi.

  • Password — set the password of the pi user (it is a good idea to change the password from the factory default ‘raspberry’)
  • Boot — select to show the Desktop or CLI (command line interface) when your Raspberry Pi starts
  • Auto Login — enabling this option will make the Raspberry Pi automatically log in whenever it starts
  • Network at Boot — selecting this option will cause your Raspberry Pi to wait until a network connection is available before starting
  • Splash Screen — choose whether or not to show the splash (startup) screen when your Raspberry Pi boots

Interfaces

You can link devices and components to your Raspberry Pi using a lot of different types of connections. The Interfaces tab is where you turn these different connections on or off, so that your Raspberry Pi recognises that you’ve linked something to it via a particular type of connection.

Make Sure You desire things!

  • Camera — enable the Raspberry Pi Camera Module
  • SSH — allow remote access to your Raspberry Pi from another computer using SSH
  • VNC — allow remote access to the Raspberry Pi Desktop from another computer using VNC
  • SPI — enable the SPI GPIO pins
  • I2C — enable the I2C GPIO pins
  • Serial — enable the Serial (Rx, Tx) GPIO pins
  • 1-Wire — enable the 1-Wire GPIO pin
  • Remote GPIO — allow access to your Raspberry Pi’s GPIO pins from another computer

After the all setting please reboot Raspberry Pi

Download and Installation Putty

Step 2: Configuration and Installation

1. Double-click the downloaded MSI file to start the installation.

2. Click Next on the welcome screen to continue with the installation.

3. Click Next if you don't need to modify the installation path. Click Change... to specify another path.

4. Select which product features you want to install. Click Install.

5. Upon completing the installation, the program shows a 'Setup complete' screen. Check/uncheck the View README file option if you want to see the developer's notes. Click Finish to exit the installer.

A successful PuTTY installation window.

Step 3: Run Putty

Run PuTTY after the installation to make sure it functions properly. Double-click the icon on Desktop or search 'putty' in the search bar and press Enter.

How to run PuTTY after installation. If there were no issues during installation, the PuTTY configuration window opens:

The PuTTY configuration window allows you to specify how you want to connect. The configuration options allow you to set up the connection type, port, and connect to a server. Choose between SSH, Telnet, SUPDUP, raw, rlogin, serial, or bare SSH connection, and enter a server hostname or IP address.

1) Make sure that SSH is enabled on your Raspberry Pi

2) Find out the IP address of your Raspberry. I usually scan my network with Fing to find the Raspberry. In case you have access to the console you can also type the following command:

find IP by this command

pi@raspberrypi:~ $ sudo ifconfig

it will show the network adapters and the assigned ip-address.

3.) The Putty window opens

If you haven't find IP goto this link and download Advance IPscanner

https://www.advanced-ip-scanner.com/download/

Downloading will be start automatically

1: After opening the downloaded file, the setup file will open with “Select the Language” tab.

2: After selecting the language, It will prompt you to the installation page. You can either choose to install or you can run a portable version. We have chosen the installation here. Select “Install” radio button and click “Next“.

3: You will get the “End User License Agreement“. Read and choose “I Accept the Agreement” and click “Install“.

4: Installation will start.

5: Once installed, you can start running the application.

6: This is the homepage of this application. Click “Scan” to scan all the connected devices to this network.

7: The list will appear like this. You can right-click on any device and try controlling it with the help of Radmin or RDP.

Connect Raspberry Pi with Laptop/PC and Open Advanced IP scanner

Open Putty and enter the IP address

Now, Open Putty and enter the IP address and click on open.

Click “Open” and you’re ready to log on.

Standard user = pi --------------------->Defualt User is pi

Standard password = raspberry ----------->Defualt Password is raspberry

Please note that the password will not be visible when you type, just type and enter.

You can also view GUI of Raspberry Pi with the help of VNC Viewer

Connect from Windows client: Visit the RealVNC https://www.realvnc.com/en/connect/download/viewer/ site and download the client for your operating system and install. Once it’s done, fire up the VNC viewer and enter the Raspberry PI IP address and hit enter. You are going to see a warning message like this.

After the continue just enter the user or password then click connect now you can see RaspberryPi Screen

About

Explore the Raspberry Pi Learning Repository on GitHub for comprehensive resources and projects. Learn, create, and join the community to unleash your potential with this versatile single-board computer. Happy Raspberry Pi learning!

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages


Back | FazBrowse Home | New Git URL