🤖 Alin Li · isetegemise töötuba

Build a Robot
with Arduino!

Avatud riistvara kohtub sinu kujutlusvõimega! Selles töötoas saad teada, mis on Arduino, koostad osade nimekirja, ühendad oma esimese vooluringi, kirjutad koodi ja äratad roboti ellu!

What is Arduino? 🔧 Start Building! ⚡
🔧 AVATUD RIISTVARA

Mis on Arduino?

The gateway to the physical world of computing!

🔧 Arduino = väike avatud lähtekoodiga arvuti

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% avatud lähtekoodiga — 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% avatud lähtekoodiga
💰 $5–$30 plaadi kohta
🌍 Millions of users
📚 Hiiglaslik kogukond
🎓 Perfect for learning
🤖 Robootika
💡 LEDs & Lights
🌡️ Sensors
🔊 Heli
⚙️ Motors

🧠 Kuidas Arduino töötab (lihtsalt!)

Think of Arduino like a very simple robot brain:

1. SISEND: Arduino reads data from sensors (temperature, light, distance, touch, sound)
2. TÖÖTLUS: Your code (program) tells Arduino what to do with that data
3. VÄLJUND: Arduino controls things (turn on LED, spin motor, play sound, display text)

🌡️ Sensor (Input) → 🧠 Arduino (töötlus) → 💡 LED/Motor (Output)
🛒 OSTUNIMEKIRI

Mida pead ostma

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) sisaldab kõike eelnevat NING 15 projektiga juhendit. Või osta Elegoo Super Starter Kit (~$35) — suurepärane Arduino-ühilduv komplekt veelgi rohkemate osadega! Kõik sobib avatud lähtekoodiga lahendustega.

🔓 Miks on Arduino eriline?

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

Sinu esimesed 3 projekti — samm-sammult!

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. Kui suudad LED-i vilgutada, suudad juhtida ükskõik mida!

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️⃣ Ühenda LED-i long leg (+) through a 220Ω resistor to Viik 13
2️⃣ Ühenda LED-i short leg (-) to GND (maa)
3️⃣ Ühenda Arduino USB kaudu arvutiga
4️⃣ Open Arduino IDE and paste this code:

blink.ino
// Minu esimene Arduino projekt! // Lülitab LED-i vilkudes sisse ja välja void setup() { pinMode(13, OUTPUT); // Määra viik 13 väljundiks } void loop() { digitalWrite(13, HIGH); // Lülita LED SISSE delay(1000); // Oota 1 sekund digitalWrite(13, LOW); // Lülita LED VÄLJA delay(1000); // Oota 1 sekund }

5️⃣ Click Upload (noolenupp →) Arduino IDE-s
6️⃣ Watch your LED blink! 🎉

📖 Koodi mõistmine

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) = oota 1000 millisekundit = 1 sekund. Proovi muuta väärtuseks 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

🚦 Projekt 2: valgusfoor!

⏱️ 20 minutes

Nüüd juhime 3 LED-i to simulate a traffic light — red, yellow, green — just like a real one!

What you need: 3 LED-i (punane, kollane, roheline), 3 takistit (220Ω), ühendusjuhtmed ja makettplaat.

WIRING: Pin 8 → 220Ω → RED LED → GND Pin 9 → 220Ω → YELLOW LED → GND Pin 10 → 220Ω → GREEN LED → GND
traffic_light.ino
// Foorisimulaator! int red = 8; int yellow = 9; int green = 10; void setup() { pinMode(red, OUTPUT); pinMode(yellow, OUTPUT); pinMode(green, OUTPUT); } void loop() { // ROHELINE — sõida! digitalWrite(green, HIGH); delay(5000); // 5 sekundit digitalWrite(green, LOW); // KOLLANE — aeglusta! digitalWrite(yellow, HIGH); delay(2000); // 2 sekundit digitalWrite(yellow, LOW); // PUNANE — peatu! digitalWrite(red, HIGH); delay(5000); // 5 sekundit digitalWrite(red, LOW); }
🎯 Challenge: Make it smarter!

Lisa surunupp — vajutamisel läheb foor punaseks (nagu ülekäiguraja nupul!). Vihje: kasuta digitalRead() to read the button state.

3

📏 Projekt 3: kaugusalarm!

⏱️ 30 minutes — Your first sensor project!

Nüüd kasutame sensor! Ultraheliandur HC-SR04 mõõdab kaugust helilainetega, nagu nahkhiir! Kui miski tuleb liiga lähedale, annab sumisti häiret!

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
// Kaugushäire ultrahelianduriga! 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() { // Saada ultraheliimpulss digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); // Mõõda kaja kestust long duration = pulseIn(echoPin, HIGH); int distance = duration * 0.034 / 2; Serial.print("Distance: "); Serial.print(distance); Serial.println(" cm"); // Häire, kui kaugus on alla 20cm! if (distance < 20) { digitalWrite(led, HIGH); tone(buzzer, 1000); // Piiks! } 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

Veel 10 projektiideed!

Kui põhitõed on selged, on võimalused lõputud.

🎹

Miniklaver

Buttons + buzzer = a tiny musical keyboard!

Beginner
🌡️

Weather Station

Mõõda temperatuuri ja niiskust ning kuva LCD-l

Intermediate
🚗

Robot Car

Mootorid + kaugusandur = isejuhtiv miniauto!

Intermediate
🌱

Taimekastja

Soil moisture sensor auto-waters your plants

Beginner
🔐

Door Lock

Keypad + servo motor = secret door lock!

Intermediate
🎮

Simon Game

Mälumäng LEDide ja nuppudega

Beginner
📻

FM Radio

Build your own radio receiver!

Edasijõudnud
🤖

Robot Arm

Servo motors controlled by joystick

Edasijõudnud
💡

Smart LED Strip

Colorful programmable LED animations

Beginner
🏠

Home Automation

Control lights & fans with your phone!

Edasijõudnud
💻 TARKVARA

Paigalda Arduino IDE — tasuta ja avatud lähtekoodiga!

💻 Arduino IDE — sinu programmeerimistööriist

The Arduino IDE (Integrated Development Environment) is where you write, compile, and upload code to your Arduino board. It's 100% tasuta ja avatud lähtekoodiga!

Install on Linux
# Paigalda Arduino IDE Linuxile: $ sudo apt install arduino # Või laadi uusim versioon alla saidilt 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 Avatud riistvara!

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!

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

„Ja Me tegime raua tema jaoks pehmeks.“ — Arduino teeb elektroonika kõigile lihtsamaks. Ehita, loo ja jaga! ✨

Visit arduino.cc 🔧