0% found this document useful (0 votes)
24 views10 pages

Raspberry Pi Setupby Pallav

this document is a description of Rasperry

Uploaded by

joshua kanatt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views10 pages

Raspberry Pi Setupby Pallav

this document is a description of Rasperry

Uploaded by

joshua kanatt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Raspberry Pi Setup

(Raspberry Pi 4)
[PALLAV PRINCE]
YouTube Channel: https://www.youtube.com/ElectroPrince
Webpage: https://sites.google.com/view/pallavp
GitHub: https://github.com/pallavprince
RG: https://www.researchgate.net/profile/Pallav-Prince
LinkedIn: https://www.linkedin.com/in/pallav-prince-827516139/

1. Formatting of SD card using FAT32 (Methode-1)


I. Format SD card using software from https://www.sdcard.org/downloads/formatter/ or
II. Go to https://rufus.ie/ download software and format to make FAT32

<Lable>
FreeDos
MBR
BIOS
Large FAT32

III. Copy unzipped NOOBS to SD Card https://www.raspberrypi.org/downloads/noobs/


IV. Insert SD card into Raspberry Pi board and power ON
V. Press and Hold Shift Key when Appear the Shift Button on Screen till open Installation window
VI. Connect internet (Wi-fi/Ethernet)
VII. Mark on Raspbian Full [RECOMMENDED] and if you want other software then mark those software

VIII. Click on install and leave for successfully complete it will reboot and appear Welcome window
IX. Click on Next then select country, Language, Time Zone, and set Password (optional)
X. Connect internet (Wi-fi/Ethernet) and leave for update (Please wait for completion “System is up to date”)
XI. Restart the System

YouTube Channel: https://www.youtube.com/ElectroPrince || Webpage: 1


https://sites.google.com/view/pallavp || GitHub: https://github.com/pallavprince ||RG:
https://www.researchgate.net/profile/Pallav-Prince || LinkedIn: https://www.linkedin.com/in/pallav-
prince-827516139/
2. OS install in Raspberry pi (Methode-2)
I. Download official Raspberry Pi imager

II. And keep at least 8 GB micro-SD memory card (Card reader Adaptor is recommended) and format to FAT32
or Erase the card by Raspberry Pi imager

Follow the on-screen instructions. It may take around 1 hr.


III. After installing OS unmount the card from PC/Mac and insert in Raspberry Pi to start the raspberry Pi.

3. Screen configuration on Raspberry pi (SSH/ VNC/ DSI/ HDMI)


I. For SSH use “SSH” enable in interface menu
a. If Monitor or screen is not connected, then use SSH first time to set VNC or other option by boot
SSH.
b. Shutdown Raspberry Pi and remove SD card from Board.
c. Insert SD card in PC/MAC (recommend use card Adaptor and put switch UP for unlock).
d. Go to SD card “boot” directory using file manager.
e. Create a new empty file named ssh without any extension, inside the boot directory (Open notebook
and save empty file remove file extension).
f. Remove the SD card from your computer and put it in your Raspberry Pi.
g. Power on your Pi board.
h. On boot automatically Pi will check whether this file exists and if it does, SSH will be enabled, and
the file is removed which created earlier.
i. Ensure IP address of Raspberry pi board (Prefer Ethernet connection so no need to additional
configuration)
j. You may get IP address from Router admin
k. Login on Pi using ssh by
i. ssh <username>@<ip address> example: ssh [email protected]
ii. if key warning appears and refuse connection on ssh then refresh the ssh key
iii. To update the ssh key run command on host machine ssh-keygen -R <host ip> and then again
run command on host machine for clint (RPI) key refresh, ssh-keygen -R <Raspberry pi ip>
Example: ssh-keygen -R 192.168.0.3
iv. Default username of Raspberry pi is pi and password is raspberry
v. For Raspberry pi command line setup open terminal on RPi or run in ssh terminal
sudo raspi-config

II. For VNC use “VNC” enable in interface menu


a. Use same user account in host as well as in clint for remote over cloud connectivity
YouTube Channel: https://www.youtube.com/ElectroPrince || Webpage: 2
https://sites.google.com/view/pallavp || GitHub: https://github.com/pallavprince ||RG:
https://www.researchgate.net/profile/Pallav-Prince || LinkedIn: https://www.linkedin.com/in/pallav-
prince-827516139/
b. Desktop mode and CLI mode set using sudo raspi-config Menu.

III. For DSI or HDMI use Screen configuration menu


a. Screen setting or resolution:
b. sudo raspi-config
c. HDMI-> Enable = Set resolution as per required
d. Composite-> Enable = Fix resolution
e. For 2.8-inch 40 PIN GPIO wave share Screen follow wave share instructions and use sudo nano
for file edit

4. First time Configuration of Raspberry Pi


I. Open Terminal windows and run each code below:
“Don’t run these set of Code frequently if you are already configured or using Raspberry Pi”
“if any code returns error, then ignore that code and proceed to next task”
(a) sudo apt-get update
(b) sudo apt-get upgrade
(c) sudo apt-get dist-upgrade
(d) sudo reboot
(e) sudo apt-get update
(f) sudo apt-get upgrade
(g) sudo rpi-update
(h) sudo apt install rpi-eeprom
(i) sudo reboot
(j) sudo apt-get clean
(k) sudo reboot

YouTube Channel: https://www.youtube.com/ElectroPrince || Webpage: 3


https://sites.google.com/view/pallavp || GitHub: https://github.com/pallavprince ||RG:
https://www.researchgate.net/profile/Pallav-Prince || LinkedIn: https://www.linkedin.com/in/pallav-
prince-827516139/
II. Configuration Settings of Raspberry Pi:

Optional

5. Task During Use of Raspberry Pi


I. Open Terminal Windows and run code Time to time
(a) sudo pip install --upgrade pip
(b) sudo pip3 install --upgrade pip
(c) sudo apt-get update
(d) sudo apt-get upgrade
(e) sudo apt-get dist-upgrade
(f) sudo reboot
6. Installation of Python and its library on Raspberry Pi
I. Open Terminal Windows and run Code
“if any code returns error, then ignore that code and proceed to next task”
(a) sudo apt-get update
(b) sudo apt install python3 idle3
(c) sudo pip3 install pip
(d) sudo pip install pip
(e) sudo pip install pip3
(f) sudo pip3 install pip3
(g) sudo pip install --upgrade pip
(h) sudo pip3 install --upgrade pip
(i) sudo pip list
(j) sudo pip3 list
(k) sudo pip3 install guizero
(l) sudo pip3 install gpiozero
(m) sudo pip install pip guizero
(n) sudo pip install pip gpiozero
(o) sudo pip install pip pytest-shutil
(p)
➢ For uninstall any individual module sudo pip3 uninstall <name of module>
7. Raspberry Pi System Operation on Root
I. Open Terminal Windows and run code for set file or folder permission
(a) Connect the screen
(b) sudo chmod *** /<path>

YouTube Channel: https://www.youtube.com/ElectroPrince || Webpage: 4


https://sites.google.com/view/pallavp || GitHub: https://github.com/pallavprince ||RG:
https://www.researchgate.net/profile/Pallav-Prince || LinkedIn: https://www.linkedin.com/in/pallav-
prince-827516139/
(c) sudo chmod 777 /etc/rc.local
(d) sudo chmod 777 /sys/devices/platform/rpi_backlight/backlight/rpi_backlight/brightness
“First connect RPi Official Screen to control Brightness and after connecting the RPi official Screen all
backlight folder Auto installed in System. If Screen is not connected then Brightness folder not show.
External Display brightness not control by this method”

***There are three Classes – Owner, Group, Others***


0 – no permission || 1 – execute || 2 – write || 3 – write and execute || 4 – read
5 – read and execute || 6 – read and write || 7 – read, write, and execute
#755 – This set of permission is commonly used in web server permissions to read, write and execute
#777 – Everyone can read write and execute. In a web server, it is not advisable to set ‘777’
#644 – Only the owner can read and write. Everyone else can only read. No one can execute the file.
#link for reference "sudo chmod" https://www.maketecheasier.com/file-permissions-what-does-chmod-777-
means/
II. Add command line to <rc.local> to run code on bootup of the raspberry pi
path Location of Terminal file </etc/rc.local>

8. Raspberry Pi 4 PIN OUT

YouTube Channel: https://www.youtube.com/ElectroPrince || Webpage: 5


https://sites.google.com/view/pallavp || GitHub: https://github.com/pallavprince ||RG:
https://www.researchgate.net/profile/Pallav-Prince || LinkedIn: https://www.linkedin.com/in/pallav-
prince-827516139/
YouTube Channel: https://www.youtube.com/ElectroPrince || Webpage: 6
https://sites.google.com/view/pallavp || GitHub: https://github.com/pallavprince ||RG:
https://www.researchgate.net/profile/Pallav-Prince || LinkedIn: https://www.linkedin.com/in/pallav-
prince-827516139/
Some Quick Note on command line for Raspberry Pi
sudo apt-get update
sudo apt-get dist-upgrade ****Single time only

sudo apt-get update


sudo apt-get -y dist-upgrade**** never

sudo apt-get update


sudo apt-get upgrade
sudo reboot

sudo apt install python3 idle3

sudo pip3 install name_of_module

pip3 install name_of_module. Wwwwwww

pip3 install --upgrade name_of_module

Pip3 list

chmod 777 / <path>


sudo 777 /<path>

Screen setting or resolution:


sudo raspi-config
HDMI-> Enable = Set resolution as per required
Composite-> Enable = Fix resolution

*****______*****_____
Connect raspberry pi on SSH network

Test first
ping <ip>
ssh [email protected]

Raspberry user name "pi"


Default Password: raspberry
sudo raspi-config

*****_____*****_____

*****
Task During Use of Raspberry Pi
Open Terminal Windows and run code Time to time
sudo pip install --upgrade pip
sudo pip3 install --upgrade pip
sudo apt-get update
sudo apt-get upgrade
sudo reboot
*****
Initialization of R Pi
Open Terminal windows and run each code below:
YouTube Channel: https://www.youtube.com/ElectroPrince || Webpage: 7
https://sites.google.com/view/pallavp || GitHub: https://github.com/pallavprince ||RG:
https://www.researchgate.net/profile/Pallav-Prince || LinkedIn: https://www.linkedin.com/in/pallav-
prince-827516139/
\u201cDon\u2019t run these set of Code frequently"
\u201cif any code returns error, then ignore that code"

sudo apt-get update


sudo apt-get upgrade
sudo apt full-upgrade
sudo reboot

**sudo apt-get dist-upgrade** Danger


sudo apt-get update
sudo apt-get upgrade
**sudo rpi-update** very danger pre-releas
sudo apt-get clean
sudo reboot

*****
If you have done an rpi-update and things are not working as you wish, if your Raspberry Pi is still bootable you can
return to the stable release using:

sudo apt-get update


**sudo apt install --reinstall libraspberrypi0 libraspberrypi-{bin,dev,doc} raspberrypi-bootloader raspberrypi-kernel
*****
Installation of Python and its library on Raspberry Pi
Open Terminal Windows and run Code

sudo apt-get update


sudo apt install python3 idle3
sudo pip3 install pip
sudo pip install pip
sudo pip install pip3
sudo pip3 install pip3
sudo pip install --upgrade pip
sudo pip3 install --upgrade pip
sudo pip list
sudo pip3 list
sudo pip3 install guizero
sudo pip3 install gpiozero
sudo pip install pip guizero
sudo pip install pip gpiozero
sudo pip install pip pytest-shutil

For uninstall any individual module sudo pip3 uninstall <name of module>

*****
For set file or folder permission
Connect the screen
sudo chmod *** /<path>

*****
RPi screen Britness control, NOT Use for EXTERNAL SCREEN"
sudo chmod 777 /etc/rc.local
sudo chmod 777 /sys/devices/platform/rpi_backlight/backlight/rpi_backlight/brightness
*****
Downloaded package files (.deb files) are kept in /var/cache/apt/archives
Remove these in order to free up space with
YouTube Channel: https://www.youtube.com/ElectroPrince || Webpage: 8
https://sites.google.com/view/pallavp || GitHub: https://github.com/pallavprince ||RG:
https://www.researchgate.net/profile/Pallav-Prince || LinkedIn: https://www.linkedin.com/in/pallav-
prince-827516139/
sudo apt clean
sudo apt-get clean

YouTube Channel: https://www.youtube.com/ElectroPrince || Webpage: 9


https://sites.google.com/view/pallavp || GitHub: https://github.com/pallavprince ||RG:
https://www.researchgate.net/profile/Pallav-Prince || LinkedIn: https://www.linkedin.com/in/pallav-
prince-827516139/
Bonus:
ROOT CONFIG.TXT (Initial set up)

YouTube Channel: https://www.youtube.com/ElectroPrince || Webpage: 10


https://sites.google.com/view/pallavp || GitHub: https://github.com/pallavprince ||RG:
https://www.researchgate.net/profile/Pallav-Prince || LinkedIn: https://www.linkedin.com/in/pallav-
prince-827516139/

You might also like