Building a
By Abdoullah Alalgui
Raspberry pi
is simpler than
you think.
بالدارجة
By Abdoullah Alalgui
: أوال كبيرة
What’s a Rapberry PI ?
Raspberry Pi hiya wahd lboard sghira bhal
pc, li katkhlik tdir chi projet informatique b
er taman rkhis !
ut
p ر
co خيص
m
فاش أنا غاتنفغني؟
Raspberry PI is the
future of Robotics
The world is moving towards the adoption of AI and its application in robotics
إيوا أجي دابا تعرف
كيفاش تخدم بها.
Raspberry Pi
ماشي شيحاجة تقدر
تعلمها فأي بالصة
ثانيا كبيرة :
Setting Up Your Raspberry PI
What you'll خا
ص
ك ال
need س
لف
أي و
اجة قبل
ح
Display (monitor, Tv ...) Micro HDMI to HDMI cable
(recommended) (or HDMI-HDMI + Micro
Raspberry Pi 4 or newer
HDMI adapter)
4GB or 8GB
keyboard + mouse
(recommended)
Power Supply ( or just any
type C charger) Sd card 16Gb or higher
Prepare the
SD card:
1. Download Raspberry Os from Internet
2. Plug your sd card into your computer
3. Select your sd card and select “Erase”
(scroll down on OS list) then “write” (to
format your card)
4. Press Ctrl + Shift + X
to open advanced
settings,
then configure your Wi-Fi
SSID and password.
Alternatively, you can use
an Ethernet cable
directly to the board. 5. Reselect your SD card and choose
Set a hostname and local Raspberry Pi OS (32-bit or 64-bit)
settings (recommended) and finally rewrite again.
😭 متخلعش أنا أنوريك كلشي
Connecting your Raspberry PI
مور ماتدير هاد المراحل
غاتقدر تحكم ب Raspberry
PIديالك بحال شي Pc
إال منكانش عندك Display
+mouse+keyboard
تقدر تخدم ب SSH ولكن الطريقة البسيطة كتبقى سهلة
و عملية كثر.
قبل مندوزو لمرحلة programmation
أجي بعدا تعرف
ثالثا كبيرة :
Program Your Raspberry PI
Example:
Blinking led
لغة البرمجة لي عزيزة علينا كاملين و سهلة ;)
بدا صغير باش تولي كبير
1 .Prepare the
Hardware no
لبحا
rdui
د عاA
ي
What you’ll need:
1 LED
1 resistor (220Ω is ideal)
2 jumper wires
How to connect:
Connect the positive leg of the LED
(longer leg) to GPIO pin 17 (as example).
Connect the negative leg of the LED
(shorter leg) to one end of the resistor.
Connect the other end of the resistor
to a ground (GND) pin.
2. First time using
Python
فPython فأول مرة غاتستعمل
خاصك ضروري تدير,Raspberry PI
: هاد الحوايج
Install had 2 Librairies (typically pre-installed on Raspberry Pi OS). Just
in case, search for terminal in your desktop then run:
sudo apt update
sudo apt install python3-gpiozero python3-rpi.gpio
Run this command to check if you have GPIO permissions:
ls /dev/gpiomem
If it outputs /dev/gpiomem, you're good. Otherwise, run this command:
sudo adduser $USER gpio then reboot sudo reboot
Write your
code
Raspberry Pi كيتستعملو فcode editors هما أكثرNano وThonny
Nano Thonny
تقدر تحلو غير زوينةInterface
terminal من 1. Run in terminal:
1. Open the app debugger فيه
خفيف و سريع nano blink.py
(preinstalled in كيخدم غير معا
Raspberry PI OS)
أي لغة ماشي غير 2. Write code python
2. File > New ساهل
python 3. Run:
python3 blink.py 3.Write Code and
No debugger
save as “blink.py”
4.click Run button
Finally Run your code
Write this code for and test
led blink:
from gpiozero import LED هاكا تكون صايبتي أول
from time import sleep
ديالك بprojet
# Setup
led = LED(17) # Pin 17 Raspberry PI
# Blink the LED
while True:
led.on() # Turn LED on
sleep(1) # Wait 1 second شنو دبا بقا لقدام باش
led.off() # Turn LED off
sleep(1) # Wait 1 second ؟... تزيد تعلم
رابعا كبيرة :
Practice Using
Raspberry PI
وصلتي ألصعب مرحلة,
حيت ماشي ساهل
تواضب عىل شي حاجة
!Good luck
Building a
Raspberry pi
is simpler than
you think.
The End
By Abdoullah Alalgui
إال,شكرا ألي واحد قرا الكتاب و استافد
🙏 عجبك بارتاجيه باش تعم الفائدة