🤖 Alin Li · ورشة اصنعها بنفسك

Build a Robot
with Arduino!

عتاد مفتوح المصدر يلتقي بخيالك! ستتعلم في هذه الورشة ما هو Arduino، وتحصل على قائمة المكونات، وتوصل دائرتك الأولى، وتكتب الشيفرة، وتُحيي روبوتك!

What is Arduino? 🔧 Start Building! ⚡
🔧 عتاد مفتوح

ما Arduino؟

The gateway to the physical world of computing!

🔧 Arduino = حاسوب صغير مفتوح المصدر

Arduino is a small, affordable microcontroller board that you can program to control lights, motors, sensors, and all kinds of electronic components. It's like a tiny brain for your inventions!

What makes Arduino special? It's مفتوح المصدر 100% — both the hardware design and the software. Anyone can build, modify, and improve Arduino boards. This is why they're so affordable ($5–$30) and so widely used.

Arduino was created in 2005 by a team of Italian engineers at a design institute in Ivrea, Italy. They wanted to give students an easy, affordable way to create interactive projects. Now it's used by millions of people worldwide — from 9-year-old kids to NASA engineers!

🔓 مفتوح المصدر 100%
💰 $5–$30 لكل لوحة
🌍 Millions of users
📚 مجتمع ضخم
🎓 Perfect for learning
🤖 الروبوتات
💡 LEDs & Lights
🌡️ Sensors
🔊 الصوت
⚙️ Motors

🧠 كيف يعمل Arduino (ببساطة!)

Think of Arduino like a very simple robot brain:

1. الإدخال: Arduino reads data from sensors (temperature, light, distance, touch, sound)
2. المعالجة: Your code (program) tells Arduino what to do with that data
3. الإخراج: Arduino controls things (turn on LED, spin motor, play sound, display text)

🌡️ Sensor (Input) → 🧠 Arduino (المعالجة) → 💡 LED/Motor (Output)
🛒 قائمة المشتريات

ما تحتاج إلى شرائه

Everything to build your first 5+ projects!

🛒

Arduino Starter Kit — Parts List

🧠Arduino Uno R3 board (or compatible clone)~$8–$25
🔌USB cable (Type-B to USB-A)~$2
🍞Breadboard (for prototyping without soldering)~$3
🔗Jumper wires (male-to-male, pack of 65)~$3
💡LEDs (red, green, yellow — pack of 30)~$2
⚡Resistors (220Ω and 10KΩ — pack of 100)~$2
🔘Push buttons (pack of 10)~$1
🔊Buzzer / Piezo speaker~$1
🌡️Temperature sensor (DHT11)~$2
📏Ultrasonic distance sensor (HC-SR04)~$2
Total Cost: ~$25–$45 (for EVERYTHING!)
💡 Pro Tip: Buy a Kit!

The Arduino Starter Kit (~$30–$50) تتضمن كل ما سبق بالإضافة إلى دليل يحتوي على 15 مشروعًا. أو اشترِ Elegoo Super Starter Kit (~$35) — مجموعة رائعة متوافقة مع Arduino وبها قطع أكثر! جميعها متوافقة مع المصدر المفتوح.

🔓 لماذا يتميّز Arduino

Unlike Raspberry Pi, Arduino doesn't run an operating system. It runs ONE program at a time, which makes it perfect for controlling physical things. And because it's open-source hardware, clones cost as little as $3–$5 and work exactly the same!

⚡ BUILD TIME

مشاريعك الـ 3 الأولى — خطوة بخطوة!

From blinking an LED to building a distance alarm!

1

💡 Project 1: Blink an LED!

⏱️ 10 minutes — The "Hello World" of hardware!

Every programmer's first code is "Hello World." In hardware, the equivalent is blinking an LED. إذا استطعت جعل LED يومض، فبإمكانك التحكم بأي شيء!

What you need: Arduino board, USB cable, 1 LED, 1 resistor (220Ω), 2 jumper wires, breadboard.

WIRING DIAGRAM: Arduino Pin 13 ──── [ 220Ω Resistor ] ──── [ LED + (long leg) ] │ Arduino GND ─────────────────────────── [ LED - (short leg) ] BREADBOARD VIEW: ┌─────────────────────────┐ │ Arduino │ │ Pin 13 → wire → [R] → │─→ LED (+) long leg │ GND → wire ────────│─→ LED (-) short leg └─────────────────────────┘

Steps:

1️⃣ وصّل مصباح LED من جهة long leg (+) through a 220Ω resistor to الطرف 13
2️⃣ وصّل مصباح LED من جهة short leg (-) to GND (الأرضي)
3️⃣ وصّل Arduino بالحاسوب عبر USB
4️⃣ Open Arduino IDE and paste this code:

blink.ino
// مشروعي الأول مع Arduino! // يجعل LED يومض تشغيلًا وإطفاءً void setup() { pinMode(13, OUTPUT); // اضبط الطرف 13 كمخرج } void loop() { digitalWrite(13, HIGH); // شغّل LED delay(1000); // انتظر 1 ثانية digitalWrite(13, LOW); // أطفئ LED delay(1000); // انتظر 1 ثانية }

5️⃣ Click Upload (زر السهم →) في Arduino IDE
6️⃣ Watch your LED blink! 🎉

📖 فهم الشيفرة

setup() runs ONCE when Arduino starts — we set pin 13 as an output.
loop() runs FOREVER in a loop — we turn the LED on, wait, turn it off, wait, repeat!
delay(1000) = انتظر 1000 مللي ثانية = ثانية واحدة. جرّب تغييرها إلى 200 for fast blinking!

🎉 You Did It!

You just wrote code that controls a physical object in the real world! This is the foundation of robotics, IoT, and embedded systems. Everything from traffic lights to Mars rovers works on this same principle!

2

🚦 المشروع 2: إشارة مرور!

⏱️ 20 minutes

والآن لنتحكم بـ 3 مصابيح LED to simulate a traffic light — red, yellow, green — just like a real one!

What you need: 3 مصابيح LED (أحمر وأصفر وأخضر)، و3 مقاومات (220Ω)، وأسلاك توصيل، ولوحة تجارب.

WIRING: Pin 8 → 220Ω → RED LED → GND Pin 9 → 220Ω → YELLOW LED → GND Pin 10 → 220Ω → GREEN LED → GND
traffic_light.ino
// محاكي إشارة المرور! int red = 8; int yellow = 9; int green = 10; void setup() { pinMode(red, OUTPUT); pinMode(yellow, OUTPUT); pinMode(green, OUTPUT); } void loop() { // أخضر — انطلق! digitalWrite(green, HIGH); delay(5000); // 5 ثوانٍ digitalWrite(green, LOW); // أصفر — تمهّل! digitalWrite(yellow, HIGH); delay(2000); // 2 ثانية digitalWrite(yellow, LOW); // أحمر — توقف! digitalWrite(red, HIGH); delay(5000); // 5 ثوانٍ digitalWrite(red, LOW); }
🎯 Challenge: Make it smarter!

أضف زر ضغط — عند ضغطه تصبح إشارة المرور حمراء (مثل زر عبور المشاة!). تلميح: استخدم digitalRead() to read the button state.

3

📏 المشروع 3: منبّه مسافة!

⏱️ 30 minutes — Your first sensor project!

نستخدم الآن sensor! يقيس مستشعر الموجات فوق الصوتية HC-SR04 المسافة باستخدام الموجات الصوتية، كالخفاش! عندما يقترب شيء أكثر من اللازم، يُطلق الجرس إنذارًا!

What you need: HC-SR04 ultrasonic sensor, buzzer, LED, resistor, jumper wires.

WIRING: HC-SR04 VCC → Arduino 5V HC-SR04 GND → Arduino GND HC-SR04 TRIG → Pin 7 HC-SR04 ECHO → Pin 6 Buzzer (+) → Pin 11 Buzzer (-) → GND LED → Pin 13 (via 220Ω)
distance_alarm.ino
// إنذار مسافة باستخدام مستشعر فوق صوتي! int trigPin = 7; int echoPin = 6; int buzzer = 11; int led = 13; void setup() { pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); pinMode(buzzer, OUTPUT); pinMode(led, OUTPUT); Serial.begin(9600); } void loop() { // أرسل نبضة فوق صوتية digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); // قِس زمن الصدى long duration = pulseIn(echoPin, HIGH); int distance = duration * 0.034 / 2; Serial.print("Distance: "); Serial.print(distance); Serial.println(" cm"); // إنذار إذا كانت المسافة أقل من 20cm! if (distance < 20) { digitalWrite(led, HIGH); tone(buzzer, 1000); // صفير! } else { digitalWrite(led, LOW); noTone(buzzer); } delay(100); }
🎉 Amazing! You built a proximity alarm!

This is the same technology used in car parking sensors! Try changing 20 to different distances. Try making the buzzer frequency change based on distance (closer = higher pitch).

💡 NEXT PROJECTS

10 أفكار مشاريع إضافية!

بمجرد إتقان الأساسيات، تصبح الإمكانات بلا حدود.

🎹

بيانو مصغّر

Buttons + buzzer = a tiny musical keyboard!

Beginner
🌡️

Weather Station

قياس الحرارة والرطوبة وعرضهما على LCD

Intermediate
🚗

Robot Car

محرّكات + مستشعر مسافة = سيارة صغيرة ذاتية القيادة!

Intermediate
🌱

جهاز ري النباتات

Soil moisture sensor auto-waters your plants

Beginner
🔐

Door Lock

Keypad + servo motor = secret door lock!

Intermediate
🎮

Simon Game

لعبة ذاكرة بمصابيح LED وأزرار

Beginner
📻

FM Radio

Build your own radio receiver!

متقدم
🤖

Robot Arm

Servo motors controlled by joystick

متقدم
💡

Smart LED Strip

Colorful programmable LED animations

Beginner
🏠

Home Automation

Control lights & fans with your phone!

متقدم
💻 البرمجيات

ثبّت Arduino IDE — مجاني ومفتوح المصدر!

💻 Arduino IDE — أداتك للبرمجة

The Arduino IDE (Integrated Development Environment) is where you write, compile, and upload code to your Arduino board. It's مجاني ومفتوح المصدر 100%!

Install on Linux
# ثبّت Arduino IDE على Linux: $ sudo apt install arduino # أو نزّل من arduino.cc للحصول على أحدث إصدار!

Download for any platform at arduino.cc/en/software — works on Linux, Windows, and macOS!

⚠️ Safety First!

Arduino is low-voltage (5V) and safe for kids. But: never connect to mains electricity (wall sockets)! Never short-circuit the board. Always disconnect USB before changing wires. Ask an adult for help with soldering.

Welcome to the World of عتاد مفتوح!

You've just entered the world where software meets the physical world. Arduino is just the beginning — Raspberry Pi, RISC-V, 3D printers, drones — all powered by open-source hardware. The future is yours to build!

«وَأَلَنَّا لَهُ الْحَدِيدَ»

«وأَلَنّا له الحديد» — Arduino ييسّر الإلكترونيات للجميع. اصنع وابتكر وشارك! ✨

Visit arduino.cc 🔧