๐Ÿค– Alin Li ยท DIY Workshop

Build a Robot
with Arduino!

Open-source hardware meets your imagination! In this workshop, you'll learn what Arduino is, get your parts list, wire your first circuit, write code, and bring your robot to life!

What is Arduino? ๐Ÿ”ง Start Building! โšก
๐Ÿ”ง OPEN HARDWARE

What is Arduino?

The gateway to the physical world of computing!

๐Ÿ”ง Arduino = An Open-Source Tiny Computer

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% open source โ€” 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% Open Source
๐Ÿ’ฐ $5โ€“$30 per board
๐ŸŒ Millions of users
๐Ÿ“š Huge community
๐ŸŽ“ Perfect for learning
๐Ÿค– Robotics
๐Ÿ’ก LEDs & Lights
๐ŸŒก๏ธ Sensors
๐Ÿ”Š Sound
โš™๏ธ Motors

๐Ÿง  How Arduino Works (Simple!)

Think of Arduino like a very simple robot brain:

1. INPUT: Arduino reads data from sensors (temperature, light, distance, touch, sound)
2. PROCESS: Your code (program) tells Arduino what to do with that data
3. OUTPUT: Arduino controls things (turn on LED, spin motor, play sound, display text)

๐ŸŒก๏ธ Sensor (Input) โ†’ ๐Ÿง  Arduino (Process) โ†’ ๐Ÿ’ก LED/Motor (Output)
๐Ÿ›’ SHOPPING LIST

What You Need to Buy

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) includes all of the above PLUS a guidebook with 15 projects. Or buy an Elegoo Super Starter Kit (~$35) โ€” a great Arduino-compatible kit with even more parts! All open-source compatible.

๐Ÿ”“ Why Arduino is Special

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

Your First 3 Projects โ€” Step by Step!

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. If you can blink an LED, you can control anything!

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๏ธโƒฃ Connect the LED's long leg (+) through a 220ฮฉ resistor to Pin 13
2๏ธโƒฃ Connect the LED's short leg (-) to GND (ground)
3๏ธโƒฃ Connect Arduino to computer via USB
4๏ธโƒฃ Open Arduino IDE and paste this code:

blink.ino
// My first Arduino project! // Blinks an LED on and off void setup() { pinMode(13, OUTPUT); // Set pin 13 as output } void loop() { digitalWrite(13, HIGH); // Turn LED ON delay(1000); // Wait 1 second digitalWrite(13, LOW); // Turn LED OFF delay(1000); // Wait 1 second }

5๏ธโƒฃ Click Upload (the โ†’ arrow button) in Arduino IDE
6๏ธโƒฃ Watch your LED blink! ๐ŸŽ‰

๐Ÿ“– Understanding the Code

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) = wait 1000 milliseconds = 1 second. Try changing it to 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

๐Ÿšฆ Project 2: Traffic Light!

โฑ๏ธ 20 minutes

Now let's control 3 LEDs to simulate a traffic light โ€” red, yellow, green โ€” just like a real one!

What you need: 3 LEDs (red, yellow, green), 3 resistors (220ฮฉ), jumper wires, breadboard.

WIRING: Pin 8 โ†’ 220ฮฉ โ†’ RED LED โ†’ GND Pin 9 โ†’ 220ฮฉ โ†’ YELLOW LED โ†’ GND Pin 10 โ†’ 220ฮฉ โ†’ GREEN LED โ†’ GND
traffic_light.ino
// Traffic Light Simulator! int red = 8; int yellow = 9; int green = 10; void setup() { pinMode(red, OUTPUT); pinMode(yellow, OUTPUT); pinMode(green, OUTPUT); } void loop() { // GREEN - Go! digitalWrite(green, HIGH); delay(5000); // 5 seconds digitalWrite(green, LOW); // YELLOW - Slow down! digitalWrite(yellow, HIGH); delay(2000); // 2 seconds digitalWrite(yellow, LOW); // RED - Stop! digitalWrite(red, HIGH); delay(5000); // 5 seconds digitalWrite(red, LOW); }
๐ŸŽฏ Challenge: Make it smarter!

Add a push button โ€” when pressed, the traffic light goes to red (like a pedestrian crossing button!). Hint: use digitalRead() to read the button state.

3

๐Ÿ“ Project 3: Distance Alarm!

โฑ๏ธ 30 minutes โ€” Your first sensor project!

Now we're using a sensor! The HC-SR04 ultrasonic sensor measures distance using sound waves (like a bat!). When something gets too close โ€” the buzzer sounds an alarm!

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
// Distance Alarm with Ultrasonic Sensor! 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() { // Send ultrasonic pulse digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); // Measure echo time long duration = pulseIn(echoPin, HIGH); int distance = duration * 0.034 / 2; Serial.print("Distance: "); Serial.print(distance); Serial.println(" cm"); // Alarm if closer than 20cm! if (distance < 20) { digitalWrite(led, HIGH); tone(buzzer, 1000); // Beep! } 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 More Project Ideas!

Once you master the basics, the possibilities are endless.

๐ŸŽน

Mini Piano

Buttons + buzzer = a tiny musical keyboard!

Beginner
๐ŸŒก๏ธ

Weather Station

Measure temperature & humidity, show on LCD

Intermediate
๐Ÿš—

Robot Car

Motors + distance sensor = self-driving mini car!

Intermediate
๐ŸŒฑ

Plant Waterer

Soil moisture sensor auto-waters your plants

Beginner
๐Ÿ”

Door Lock

Keypad + servo motor = secret door lock!

Intermediate
๐ŸŽฎ

Simon Game

Memory game with LEDs and buttons

Beginner
๐Ÿ“ป

FM Radio

Build your own radio receiver!

Advanced
๐Ÿค–

Robot Arm

Servo motors controlled by joystick

Advanced
๐Ÿ’ก

Smart LED Strip

Colorful programmable LED animations

Beginner
๐Ÿ 

Home Automation

Control lights & fans with your phone!

Advanced
๐Ÿ’ป SOFTWARE

Install Arduino IDE โ€” Free & Open Source!

๐Ÿ’ป Arduino IDE โ€” Your Programming Tool

The Arduino IDE (Integrated Development Environment) is where you write, compile, and upload code to your Arduino board. It's 100% free and open source!

Install on Linux
# Install Arduino IDE on Linux: $ sudo apt install arduino # Or download from arduino.cc for the latest version!

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 Open Hardware!

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!

ยซูˆูŽุฃูŽู„ูŽู†ูŽู‘ุง ู„ูŽู‡ู ุงู„ู’ุญูŽุฏููŠุฏูŽยป

"And We softened iron for him." โ€” Arduino softens electronics for everyone. Build, create, and share! โœจ

Visit arduino.cc ๐Ÿ”ง