صفحه 1:
Raspberry
ملظ
صفحه 2:
What will we be doing
Firsteday?
* Learn about the Raspberry Pi
* See demos of what the Pi can do
* Short break
Second Half:
* Setup the Raspberry Pi
* Learn how to use the command line
* See demos of the Pi Camera
¢ Learn how to use Python to interact with the Pi
Camera
صفحه 3:
What is the Raspberry
۸۳220 credit-card sized computer
Plugs into a computer monitor or TV
Uses standard keyboard and mouse
Can browse the internet and play HD
video
Can also inte-~~* سات eee
world! 2 :
صفحه 4:
Raspberry Pi
Educate) eG atti Bx9ed in the UK
The Foundation’s goal is to advance the
education of adults and children in the field of
computers, computer science, and related
subjects.
https://www.raspberrypi.org/ab
صفحه 5:
Why was the Pi
Concegr@ateaddcline in computer
literacy
* In the 1990s most new Computer Science
students were experienced hobbyist
programmers.
o Tha ann one very diff----+
ave ora
صفحه 6:
Your Raspberry
RaspberryPi 2 Model B Camera
Kit
صفحه 7:
Camera Kit
Seopa ECS SD Card WiFi
لت ©
Raspberry Pi Power Pi
0
2-39
صفحه 8:
Raspberry Pi 2 Model B
quad-core ARM Cortex-A7 CPU ۲6و۰۲
VideoCore IV 3D graphics cor, *
* 1GB RAM
* 4 USB ports
* Full HDMI port
* Ethernet port
* Micro SD card slot
* Combined 3.5mm audio jack and composite
video
* Camera and display interface
* 40 General Purpose Input / Output pins
صفحه 9:
Helpful
Official RaspH¥@DS ie@site : "زرلا
https://www.raspberrypi.org/ 57
The MagPi, online Raspberry Pi magazine
https://www.raspberrypi.org/magpi/
PiWeekly, online Raspberry Pi newsletter
http://piweekly.net/
Raspberry Pi IV Beginners
https:/Awww
-youtube.com/user/RaspberryPiBeginners
The Raspberry Pi Guy
صفحه 10:
Raspberry Pi
Demo
صفحه 11:
Hands-On: Assembling
Sette det Raspberry Pi components in front
of you
a ie
ee ee
Camere 0
صفحه 12:
Hands-On: Assembling
the@cPjubber adhesive feet to the Pi case
2. Examine how the pegs inside the case match
holes on the Raspberry Pi_
صفحه 13:
Hands-On: Assembling
thiecPic Raspberry Pi into the case on the
GPIO side with the small plastic clips next to
the stand-off holes
4. Gently push down until it snaps into place
Oa و a م ie
صفحه 14:
Hands-On: Assembling
thieePithe camera cable into the top of the Pi
case with the camera facing down and the tin
صفحه 15:
Hands-On: Assembling
the Ppa up the camera socket ۱
۱0011۳9 6
صفحه 16:
Hands-On: Assembling
IthreerPpe camera cable evenly with the tin
connecters facing the HDMI port and gently
securem ١
صفحه 17:
Hands-On: Assembling
therPiec two halves of the Pi case together
9. Insert the micro SD card into the slot on the
underside of thd
صفحه 18:
Hands-On: Assembling
ehe@Pie USB WiFi dongle into one of the USB
ports
11. Plug in keyboard and mouse
12. Plug in monitor using the HDMI port
13. Make sure monitor is turned on
صفحه 19:
Hands-On: Assembling
۱/6۴۵ ۳ power button?
* The Raspberry Pi doesn’t have a power button.
It boots up as soon as you plug in the power
supply.
* If you’ve completed all the previous steps,
plug in th ~ es 1
Raspberry
صفحه 20:
Hands-On: Configuring
Instanieg Bie Operating System
The micro SD that you have comes pre-installed
with the Linux based Raspbian OS. Raspbian is a
fork of another Linux distribution called Debian.
+
RaspbianOS
صفحه 21:
Hands-On: Configuring the
Pi
How to log into the Raspberry Pi for the
first time You ۲
type it. This is a Linu
Login: pt 1 50 1137 OpenBSD Si
۲۵55۷۷۵۲۵: aga Debian GNU/Linux wheezy/s i
raspberrypi login: pi
زوسن نیا
صفحه 22:
Hands-On: Configuring
Corttlg@ritkei the Raspberry Pi for the
first time
Launch the Raspberry Pi Configuration Tool
Raspberry Pi Software Configuration Toot (raspi-confia)
setup options
2 change User Password ‘Change passuora for the default user (pl)
3 Enable Boot to Desktop/Scratch Choose whether to boot into a desktop environment, Scratch, oF the comand-Line
4 Internationalisation Options Set up Language and regional settings to match your Location
5 Enable Canera Enable this Pi to work with the Raspberry Pi Canera
6 Add to Rastrack Add this PL to the online Raspberry Pi Map (Rastrack)
7 overclock Configure overclocking for your Pi
8 Advanced options Configure advanced settings
9 About raspi-config Information about this configuration tool
<select Finish
صفحه 23:
Hands-On: Configuring
Settihgethe ikeyboard layout
1. Choose option @ ‘htercatccdizuion Options
ferent ی مس ١
tht alt of the Scand toreg,[s eallelo to the ot اجيم
ote et er to boot. into 8
مین ون fad this PL 40 the ont ine “foster Ti عت
ont igure crock for ya
ced option Contigure aduanced sett ing
ستل و Taformet ion about this cont iguretion toot
Select دتمت
صفحه 24:
Hands-On: Configuring
Settihgethe ikeyboard layout
2. Choose option 19 Okxrxe Keyboard
صفحه 25:
Hands-On: Configuring
Settihgethe ikeyboard layout
3 Choose an appropriate
keyboard type
۱2000
Ennyah 0۷8
Everex STEPnote
FLIO
Fujitsu-Siemens Computers AMILO laptop
Generic 101-key PC
6 ic 102-۷» (Intl) PC
Generic 104-key PC
TT |
<Ok> <Cancel>
صفحه 26:
Hands-On: Configuring
Settihgethe keyboard layout
4. Choose Guys (OG) for keyboard
layout
صفحه 27:
Hands-On: Configuring
Settiheesdetial command keys for the
keyboard
5. Choose the dePaut Por the hepbvord yout
صفحه 28:
Hands-On: Configuring
Settiheesdetial command keys for the
keyboard
6. Select Ov for the Control EAlt Backspace
صفحه 29:
Hands-On: Configuring
Enddney Ab camera socket
7 000056 00۲00 9 عل6
Fadvanced pt toms
9 ادو ا a {ntormat in about ts COMFlgurat on too)
crits اه
صفحه 30:
Hands-On: Configuring
Enddney Ab camera
socket
8.
صفحه 31:
Hands-On: Configuring
Optitna: 8۳ to automatically boot to GUI
9. Choose option 9 Gable Boot to Oeshiop/Goruck
SS Ty Te eens cone ee ee ee ee
3 Bayan Fi esysten ۱ ۰۲ the SD eard storage
‘for the default user (p:
jonadisation Opt
3 Buble coma
6 fd to Rastrack
3 About raspl-cont ig ورين shot thie con مها too!
<Select> inishy
صفحه 32:
Hands-On: Configuring
Optitna: 8۳ to automatically boot to GUI
10. Select Log ia os wer ‘pi ot the qouphiod سح
then select Ok
chase boot option
صفحه 33:
Hands-On: Configuring
ExitthecPifiguration
tool
11. Select Crash
2
Ensures tnt oof the 80 card strap م الاسم عا
‘password for t) ee
Uhether to hoot inte
‘adh this Pit
Sone igure ver 5
2
sar
3 bout اعم Tnforsation abort this cont igur
سم
صفحه 34:
Hands-On: Configuring
ExitthecPifiguration tool
12. Select ‘Yes if prompted to
reboot
صفحه 35:
Hands-On: WiFi
lo§etup 1-777۳
۲ 3 eS
ord: respberry lies
Debian GNU/Linux wheezys
raspberrypi login: pi
Password:
The Command Line
he Command Line ieee CES Rea CTC meen)
= ==>
following command and
صفحه 36:
Hands-On: WiFi
1۳6 224۵۲ 0
م۱0
صفحه 37:
Hands-On: WiFi
Confirm Setupwiri dongle has been
detected
1. Click the لس button in the top left
0?)
ee.
qe ~$ ifconfig ——
Wastebasket
صفحه 38:
Hands-On: WiFi
Confirm Setup wiri dongle has been
detected
صفحه 39:
Hands-On: WiFi
Connect$entdipuest
5. Click the menu button find @rePerewes
6. From Preferences select OP CocPiquraica
(Bie) مومس م»
جع
©
1د
Kesboard and Mouse Stings كر
] wr cansguaon
صفحه 40:
Hands-On: WiFi
Connect$entoHPuest
7. Click the Grad button
8. Double click OO-Grest from the
adapters ۳۰ 53
caret satus | manage neva | |
[sen] _ cise
oecomec| sean الا
صفحه 41:
Hands-On: WiFi
ssp [oon
سوم
1
‘ontenal Senge
Connect$entdipuest
9. Click on the @d
button without
making any
changes to ND-
Guest
صفحه 42:
Hands-On: WiFi
File Network Help
Adaptor 5
5 2 ۰( اه ها
Current status | YBnaue Networks | WPS |
Status: Inactive
Last message: WPS-AP-AVAILABLE
Authentication
Encryp}
550
0
۳۵
feonnect”| disconnect| scan
Connect$entdHPuest
10. Make sure OO-Grest
is the selected
network
11. Click the Ovavert
button
صفحه 43:
Hands-On: WiFi
The WifiS@ifidqdion should now be
working
The WiFi Configuration Tool will be running in
the background. You mightis see it in the top
right corne 7
صفحه 44:
Hands-On: The Command
THei¢d?@mand line gives you more control
Wastebasket
صفحه 45:
Hands-On: The Command
۱۵۵۷۱۵ how to use the command line
As we go through the command line lesson you
can also have your file system opened in the GUI
so you can see some of the changes we make.
(Mi روا
5 5 5
Dowrlases oldonties .همين
صفحه 46:
Hands-On: The Command
۱۵۱۵ how to use the command line
You may have already used a few different
commands during this presentation.
~$ sudo raspi-config
~$ startx
~$ ifconfig
Now we can learn some more commands.
Try each command as we go through them.
صفحه 47:
Hands-On: The Command
۱42۵ how to use the command
line
File Edit Tabs Help
صفحه 48:
Hands-On: The Command
۱42۵ how to use the command line
=
File Edit Tabs Help
صفحه 49:
Hands-On: The Command
۱42۵ how to use the command line
=
Eile Edit Tabs Help
صفحه 50:
Hands-On: The Command
۱42۵ how to use the command line
صفحه 51:
Hands-On: The Command
۱42۵ how to use the command line
File Edit Tabs Help
=
Eile Edit Tabs Help
صفحه 52:
Hands-On: The Command
۱42۵ how to use the command line
=
File Edit Tabs Help
=
Eile Edit Tabs Help
صفحه 53:
Hands-On: The Command
۱42۵ how 5 use the command line
options (are یت
options
comm.
chan the
File Edit Jabs Help 5
~$ ls -a—
fle Edit Tabs Help ~$ Us - Lamm) List Pike to boy Por
صفحه 54:
Hands-On: The Command
۱42۵ how to use the command line
صفحه 55:
Hands-On: The Command
۱42۵ how to use the command line
صفحه 56:
Hands-On: The Command
۱42۵ how to use the command line
=
Eile Edit Tabs Help
=
File Edit Tabs Help
صفحه 57:
Hands-On: The Command
۱42۵ how to use the command line
File Edit Tabs Help
صفحه 58:
Hands-On: The Command
۱42۵ how to use the command line
Create and open a simple text file with tupad
wet This creates a text file called myfile.txt
and opens it ina text editor called LeafPad
=
File Edit Tabs Help
Eile Edit Search Options Help
yi made a text file! {
صفحه 59:
Hands-On: The Command
۱42۵ how to use the command line
Eile Edit
صفحه 60:
Hands-On: The Command
۱42۵ how to use the command line
=
File Edit Tabs Help
Eile Edit Tabs Help
سس
صفحه 61:
Hands-On: The Command
۱42۵ how to use the command line
=
Eile Edit Tabs Help
صفحه 62:
Hands-On: The Command
۱۵۵۷۱۵ how to use the
command line
۳
واع اك Edit Tabs Help
=
File Edit Tabs Help
صفحه 63:
Hands-On: The Command
۱42۵ how to use the command line
Eile Edit Tabs Help
صفحه 64:
Hands-On: The Command
the Raspberry Pi ناملا
Gud Means Super-User DO and is followed *
by a command that requires the super-user
to complete.
* @ptxet is a package manager that you use to
install,
update, and upgrade your software.
٠ Oxet is used to access files from the internet.
صفحه 65:
Hands-On: The Command
ناملا the Raspberry Pi
Use the following command to download a file |
have prepared from the internet. The file will be
downloaded into your current working directory.
~$ wget https: /www.dropbox.com
/s/
pLmz498wo3kgnpj/ss2015.tar
صفحه 66:
Hands-On: The Command
ناملا the Raspberry Pi
صفحه 67:
Hands-On: The Command
ناملا the Raspberry Pi
صفحه 68:
Hands-On: The Command
Updidti@y the Raspberry Pi
A file called upckte-srript.sk is in the ss2015 directory.
This is a shell script. It’s a text file that contains
console commands that will execute if you run the
shell script. Type vat upckite-scriptsk to see the
contents of the script.
صفحه 69:
Hands-On: The Command
ناملا the Raspberry Pi
صفحه 70:
Hands-On: The Command
Upddidtiéy the Raspberry Pi
صفحه 71:
Hands-On: The Command
ناملا the Raspberry Pi
File Edit Tabs Help
SE لا 2
صفحه 72:
Hands-On: The Command
ناملا the Raspberry Pi
at the file now has the
صفحه 73:
Hands-On: The Command
ناملا the Raspberry Pi
Now you can run the shell script!
~$ ./update-script.sh
If you are prompted to confirm any of your
updates, just press Y and then press COTTER.
Also, the update may create the vod Pies
directory.
صفحه 74:
Hands-On: The Command
[nbEe@ing the Python Pi Camera
module
To install this module type the following:
~$ sudo apt-get install python-
picamera
If you are prompted to confirm any of your
updates, just press Y and then press 0۰
صفحه 75:
Hands-On: Python and
CRitGa EFA! to Python programming
Python is a fun and easy to learn programming
language with wide use in the professional
development world.
@® python
You'll only get a small taste of it here. There will
be a 3 hour Python training session later in the
week.
صفحه 76:
Hands-On: Python and
أمع16© وا بهن زه Camera with Python
al 06 6
File Edit Tabs Help
صفحه 77:
Hands-On: Python and
أمع16© وا بهن زه Camera with Python
صفحه 78:
Hands-On: Python and
أمع16© وا بهن زه Camera with Python
Lets launch 1@LG from the console, which
is an integrated development
hon.
er
Eile Edit Tabs Help
a Pion Sha 58
ا ا اق aloo
01 ,2014 18 عفار 6
2
Python 2.7.2
ec 4.5.
br *Licens#0* for nore information,
صفحه 79:
Hands-On: Python and
أمع16 © وا نه زه Camera with Python
First, you'll need to type teportos and press ENTER
so you have access to operating system
functionality.
This will let us call the raspistill command from
9 ython Shell مالحا
File Edit Shel Debug Options Windows Help
Python 2.7.3 (default, Mar 18 2014, 05:13:23)
[GCC 4.6.3] on Linux2
Type "copyrightg, "credits" or "license()" for more information.
>>> import os
صفحه 80:
Hands-On: Python and
أمع16© وا بهن زه Camera with Python
Now we can call the same command we used
earlier in the console. To do that type the
following: os.system(“raspistill -v -o
hello_ina”)
5 *Python Shell*
File Edit Shell Debug Options Windows Help
Python 2.7.3 (default, Har 18 2014, 05:13:23)
{6C¢ 4.6.3] on Linux2
Type "copyright", "credits" or "license ()" for more information.
>>> import os
ssyste pistill -v -o hello. jpg")
صفحه 81:
Hands-On: Python and
أمع16 © وا نه زه Camera with Python
Now try using some of these options for the
camera:
Python 2.7.3 (defaun
(GCC 4.6.3] on linux2
Type "copyright, "cred ge
لت نسوس ده درون
os.system("raspistill -v -w 600 -h 800 -q 70 -ifx cartoon -o picture. jpg")
صفحه 82:
Hands-On: Python and
Pi€oatrnvi@pahe Pi Camera with
Python
You can also take video with the
camera:
*Python Shell*
File Edit Shel Debug
/Python 2.7.3 (default
(Gcc 4.6.3] on Linux2
‘Type "copyright", "cr: Jor "license ()" for more information.
>> import os
Meiio. jpg")
>> og. system("raspis®
“w 600 -h 800 -q 70 -ifx cartoon -o picture. jpg")
0
>> os.system("raspivid -o myvideo.n264")
صفحه 83:
Hands-On: Python and
أمع16© وا به زه Camera with Python
Use this command to see a small preview of your
mm video:
os.system(“omxplayer --win ‘0 0 320 240’ myvideo.h264”)
Or this to see it full size:
os.system(“omxplayer myvideo.h264”)
0
>>> os system("raspiN Wywideo.h26a")
3
>>> os.system("omxplayer --win '0 0 320 240’ myvideo.n264")
صفحه 84:
Hands-On: Python and
ORiGa Wre@reéraspistill and raspivid
coramandsoutput file name (-o picture.jpg o
-w vid.h264) width (-w 600)
-h height (-h 800)
- sharpness, -100 to 100 (-sh 75)
sh contrast, -100 to 100 (-co 50)
brightness, 0 to 100 (-br 65)
co saturation, -100 to 100 (-sa
-br 85) vertically flip image
sa horizontally flip image
صفحه 85:
Hands-On: Python and
0۴۱69 Wrereaspistill and raspivid
commandspeg image quality, 0 to 100 (-q 70)
image effects (-ifx negative, solarise,
ifx sketch,
oilpaint, hatch, pastel,
film, watercolour,
emboss, blur, cartoon,
There are many more @pdomoreh)the Pi
Camera:
https://www.raspberrypi.org/documentation/r
صفحه 86:
Raspberry
Feel free to expPtiment with the remaining
time
٠ To exit IDLE, type eai() and press GOTER or click
the
X in the top right corner.
٠ To shutdown رک هک رز Pp
from the meni@« D left || what would you tke todo?
O«. |
| cancel || 0k |
