Module 1: How Robots Think and Move

Level: 🟢 Beginner Board: None (conceptual) Prerequisites: None Estimated time: 20–30 minutes Goal: Understand the sense–decide–act control loop and identify the five functional systems of a robot.


What You'll Learn

By the end of this module you will be able to describe the sense–decide–act control loop, name the five functional systems present in every robot, and identify every major component on the course robot by sight. This mental model is the foundation every later module builds on.


What You Need

Everything listed below is available online (search the exact part name or alias). Total cost for the full kit is roughly $30–$50 depending on supplier.

Part Qty Notes
2WD robot chassis kit 1 Search "smart robot car kit 2WD Arduino". Should include two DC gear motors, wheels, acrylic plate, ball caster, and mounting hardware.
Arduino Uno R3 1 Or a compatible clone. Make sure it uses the ATmega328P and has a USB-B port.
L298N motor driver module 1 Blue PCB with metal heatsink. Includes onboard 5V regulator.
HC-SR04 ultrasonic sensor 1 Four pins: VCC, TRIG, ECHO, GND.
HC-05 Bluetooth module 1 Six pins: VCC, GND, TX, RX, STATE, KEY. iPhone users: buy HC-08 (BLE) instead of HC-05. See Module 07.
Half-size breadboard 1 400-point. For the voltage divider and sensor connections.
4× AA battery holder 1 4× AA = 6V nominal. All code and calibration values in this course are tuned for 6V. Include a power switch if possible.
Jumper wires, assorted 1 pack Male-to-male and male-to-female. At least 20 of each.
1 kΩ resistor 1 (+1 spare) For the HC-05 RX voltage divider (see Module 07).
2 kΩ resistor 1 (+1 spare) For the HC-05 RX voltage divider (see Module 07). Alternatively use two 1 kΩ in series.
USB-A to USB-B cable 1 For uploading sketches to the Arduino.
Mounting supplies
Double-sided foam tape 1 roll For securing the breadboard and modules to the chassis. Dampens motor vibration.
Zip ties 10-pack For cable management and securing loose wires.
Craft sticks (popsicle sticks) 2-3 For mounting the HC-SR04 sensor bracket. Alternative: use the L-bracket if your chassis kit includes one.

Buy a few extra resistors; they are cheap and easy to lose. The other components are used exactly once, so one of each is sufficient.


1.1 What a robot actually is

Ask ten people to define "robot" and you'll get ten different answers, most of them shaped by movies. For this course, we're going to throw all of that out and work with a clean, practical definition:

A robot is any machine that senses its environment, makes a decision based on what it measured, and acts on that decision physically.

That's it. A smoke detector doesn't qualify: it senses, but it has no physical agency beyond an alarm. A conveyor belt doesn't qualify: it acts, but it doesn't sense. A thermostat comes close, but it only controls temperature, not movement. Stack all three (sense, decide, act) and you have the core of every robot ever built.

The machine you'll build in this course does all three. It measures distance to nearby objects using sound waves, decides whether to drive forward or turn away, and spins its wheels to follow through. Simple. Unglamorous. Genuinely robotic.

The sense, decide, act loop

This loop is the engine running inside every autonomous machine. It repeats continuously, often hundreds of times per second. The diagram below shows how the three stages chain together, and crucially how the output feeds back into the input to create a closed-loop system.

<svg viewBox="0 0 780 220" width="100%" xmlns="http://www.w3.org/2000/svg" style="display:block;">
  <defs>
    <marker id="arr" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
      <path d="M2 2L8 5L2 8" fill="none" stroke="#1a1a18" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
    </marker>
    <marker id="arr-accent" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
      <path d="M2 2L8 5L2 8" fill="none" stroke="#c8420a" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
    </marker>
  </defs>

  <!-- SENSE box -->
  <rect x="40" y="50" width="180" height="120" rx="4" fill="#daeaf5" stroke="#7faec8" stroke-width="1"/>
  <rect x="40" y="50" width="180" height="28" rx="4" fill="#1f4d8c"/>
  <rect x="40" y="66" width="180" height="12" fill="#1f4d8c"/>
  <text x="130" y="69" text-anchor="middle" font-family="IBM Plex Mono,monospace" font-size="12" font-weight="500" letter-spacing="2" fill="#f5f2eb">SENSE</text>
  <circle cx="130" cy="115" r="10" fill="none" stroke="#1f4d8c" stroke-width="1.5"/>
  <path d="M108 93 Q80 115 108 137" fill="none" stroke="#1f4d8c" stroke-width="1.5" stroke-linecap="round"/>
  <path d="M100 86 Q62 115 100 144" fill="none" stroke="#1f4d8c" stroke-width="1" stroke-linecap="round" opacity="0.5"/>
  <path d="M152 93 Q180 115 152 137" fill="none" stroke="#1f4d8c" stroke-width="1.5" stroke-linecap="round"/>
  <path d="M160 86 Q198 115 160 144" fill="none" stroke="#1f4d8c" stroke-width="1" stroke-linecap="round" opacity="0.5"/>
  <text x="130" y="162" text-anchor="middle" font-family="Manrope,sans-serif" font-size="11" fill="#2c4a6e">Reads sensors</text>
  <text x="130" y="176" text-anchor="middle" font-family="Manrope,sans-serif" font-size="11" fill="#2c4a6e">measures the world</text>

  <!-- Arrow 1 -->
  <line x1="222" y1="110" x2="296" y2="110" stroke="#1a1a18" stroke-width="1.5" marker-end="url(#arr)"/>
  <text x="258" y="103" text-anchor="middle" font-family="IBM Plex Mono,monospace" font-size="10" fill="#6b6a65">data</text>

  <!-- DECIDE box -->
  <rect x="298" y="50" width="184" height="120" rx="4" fill="#f5eed8" stroke="#c8aa60" stroke-width="1"/>
  <rect x="298" y="50" width="184" height="28" rx="4" fill="#8a6800"/>
  <rect x="298" y="66" width="184" height="12" fill="#8a6800"/>
  <text x="390" y="69" text-anchor="middle" font-family="IBM Plex Mono,monospace" font-size="12" font-weight="500" letter-spacing="2" fill="#f5f2eb">DECIDE</text>
  <polygon points="390,88 408,106 390,124 372,106" fill="none" stroke="#8a6800" stroke-width="1.5"/>
  <line x1="390" y1="88" x2="390" y2="80" stroke="#8a6800" stroke-width="1" stroke-dasharray="2 2"/>
  <line x1="390" y1="124" x2="390" y2="132" stroke="#8a6800" stroke-width="1" stroke-dasharray="2 2"/>
  <line x1="408" y1="106" x2="416" y2="106" stroke="#8a6800" stroke-width="1" stroke-dasharray="2 2"/>
  <line x1="372" y1="106" x2="364" y2="106" stroke="#8a6800" stroke-width="1" stroke-dasharray="2 2"/>
  <text x="390" y="110" text-anchor="middle" font-family="IBM Plex Mono,monospace" font-size="9" fill="#8a6800">if / else</text>
  <text x="390" y="162" text-anchor="middle" font-family="Manrope,sans-serif" font-size="11" fill="#5a4200">Runs your code,</text>
  <text x="390" y="176" text-anchor="middle" font-family="Manrope,sans-serif" font-size="11" fill="#5a4200">picks the next action</text>

  <!-- Arrow 2 -->
  <line x1="484" y1="110" x2="558" y2="110" stroke="#1a1a18" stroke-width="1.5" marker-end="url(#arr)"/>
  <text x="520" y="103" text-anchor="middle" font-family="IBM Plex Mono,monospace" font-size="10" fill="#6b6a65">command</text>

  <!-- ACT box -->
  <rect x="560" y="50" width="180" height="120" rx="4" fill="#d8f0e5" stroke="#6ab894" stroke-width="1"/>
  <rect x="560" y="50" width="180" height="28" rx="4" fill="#1a6b4a"/>
  <rect x="560" y="66" width="180" height="12" fill="#1a6b4a"/>
  <text x="650" y="69" text-anchor="middle" font-family="IBM Plex Mono,monospace" font-size="12" font-weight="500" letter-spacing="2" fill="#f5f2eb">ACT</text>
  <circle cx="622" cy="106" r="20" fill="none" stroke="#1a6b4a" stroke-width="2"/>
  <circle cx="622" cy="106" r="5" fill="#1a6b4a"/>
  <line x1="622" y1="86" x2="622" y2="126" stroke="#1a6b4a" stroke-width="1" stroke-dasharray="3 3"/>
  <line x1="602" y1="106" x2="642" y2="106" stroke="#1a6b4a" stroke-width="1" stroke-dasharray="3 3"/>
  <circle cx="678" cy="106" r="20" fill="none" stroke="#1a6b4a" stroke-width="2"/>
  <circle cx="678" cy="106" r="5" fill="#1a6b4a"/>
  <line x1="678" y1="86" x2="678" y2="126" stroke="#1a6b4a" stroke-width="1" stroke-dasharray="3 3"/>
  <line x1="658" y1="106" x2="698" y2="106" stroke="#1a6b4a" stroke-width="1" stroke-dasharray="3 3"/>
  <text x="650" y="162" text-anchor="middle" font-family="Manrope,sans-serif" font-size="11" fill="#0e3d28">Drives motors,</text>
  <text x="650" y="176" text-anchor="middle" font-family="Manrope,sans-serif" font-size="11" fill="#0e3d28">moves the robot</text>

  <!-- Feedback arc -->
  <path d="M650 172 Q650 200 390 200 Q130 200 130 172" fill="none" stroke="#c8420a" stroke-width="1.5" stroke-dasharray="5 4" marker-end="url(#arr-accent)"/>
  <text x="390" y="215" text-anchor="middle" font-family="IBM Plex Mono,monospace" font-size="10" fill="#c8420a" letter-spacing="1">loop repeats — continuously</text>
</svg>

Fig 1.1: The sense–decide–act control loop. Every autonomous robot runs this cycle. The dashed red line shows the feedback: after acting, the robot senses again immediately.

Notice the feedback arrow at the bottom. This is what separates a robot from a simple machine that just executes a fixed script. Because the robot reads sensors after every action, it can respond to a world that keeps changing. Move the obstacle, and the robot responds differently on the next pass through the loop.

Advanced path The loop speed matters. A robot checking its sensors 10 times per second reacts to obstacles much more slowly than one checking 500 times per second. The Arduino's main loop can run tens of thousands of iterations per second under ideal conditions, but reading sensors, doing math, and driving motors all burn time. In Module 9 you'll learn why replacing delay() calls with timer-based code keeps the loop fast and responsive.


1.2 Robot anatomy: five systems

Every robot, no matter the size, shape, or purpose, is made of the same five functional systems. Learning to see a robot this way is one of the most useful habits in the field. When something breaks, you diagnose by system. When you want to add a feature, you figure out which system it belongs in.

<svg viewBox="0 0 780 420" width="100%" xmlns="http://www.w3.org/2000/svg" style="display:block;">
  <defs>
    <marker id="arr2" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse">
      <path d="M2 2L8 5L2 8" fill="none" stroke="#6b6a65" stroke-width="1.5" stroke-linecap="round"/>
    </marker>
  </defs>

  <!-- Chassis base -->
  <rect x="280" y="170" width="220" height="140" rx="12" fill="#e2ded3" stroke="#b0aba0" stroke-width="1.5"/>
  <!-- Left wheel -->
  <rect x="254" y="195" width="28" height="70" rx="8" fill="#3d3c38" stroke="#1a1a18" stroke-width="1.5"/>
  <!-- Right wheel -->
  <rect x="498" y="195" width="28" height="70" rx="8" fill="#3d3c38" stroke="#1a1a18" stroke-width="1.5"/>
  <!-- Caster front -->
  <circle cx="390" cy="322" r="10" fill="#3d3c38" stroke="#1a1a18" stroke-width="1"/>
  <!-- Arduino board -->
  <rect x="310" y="195" width="90" height="60" rx="3" fill="#1a6b4a" stroke="#0e4030" stroke-width="1"/>
  <text x="355" y="228" text-anchor="middle" font-family="IBM Plex Mono,monospace" font-size="9" fill="#a8e8c8">ARDUINO</text>
  <!-- Motor driver board -->
  <rect x="420" y="210" width="60" height="38" rx="3" fill="#1f4d8c" stroke="#0e3060" stroke-width="1"/>
  <text x="450" y="232" text-anchor="middle" font-family="IBM Plex Mono,monospace" font-size="8" fill="#a0c0f0">DRIVER</text>
  <!-- Ultrasonic sensor -->
  <rect x="355" y="166" width="70" height="24" rx="3" fill="#f5f2eb" stroke="#b0aba0" stroke-width="1"/>
  <circle cx="372" cy="178" r="7" fill="none" stroke="#6b6a65" stroke-width="1.5"/>
  <circle cx="372" cy="178" r="3" fill="#6b6a65"/>
  <circle cx="408" cy="178" r="7" fill="none" stroke="#6b6a65" stroke-width="1.5"/>
  <circle cx="408" cy="178" r="3" fill="#6b6a65"/>
  <!-- Battery -->
  <rect x="320" y="270" width="70" height="30" rx="3" fill="#c8b400" stroke="#8a7a00" stroke-width="1"/>
  <rect x="388" y="279" width="8" height="12" rx="2" fill="#c8b400" stroke="#8a7a00" stroke-width="1"/>
  <text x="355" y="289" text-anchor="middle" font-family="IBM Plex Mono,monospace" font-size="9" fill="#2a2000">BATT</text>
  <!-- Bluetooth module -->
  <rect x="412" y="265" width="46" height="22" rx="3" fill="#6030c0" stroke="#40188a" stroke-width="1"/>
  <text x="435" y="280" text-anchor="middle" font-family="IBM Plex Mono,monospace" font-size="8" fill="#e0c8ff">BT</text>

  <!-- 1. Sensing label -->
  <rect x="30" y="30" width="170" height="72" rx="4" fill="#daeaf5" stroke="#7faec8" stroke-width="1"/>
  <text x="42" y="52" font-family="IBM Plex Mono,monospace" font-size="10" font-weight="500" letter-spacing="1" fill="#1f4d8c">01 SENSING</text>
  <text x="42" y="68" font-family="Manrope,sans-serif" font-size="11" fill="#2c4a6e">Ultrasonic distance</text>
  <text x="42" y="83" font-family="Manrope,sans-serif" font-size="11" fill="#2c4a6e">sensor on the front</text>
  <text x="42" y="98" font-family="Manrope,sans-serif" font-size="11" fill="#2c4a6e">reads surroundings</text>
  <line x1="200" y1="66" x2="354" y2="172" stroke="#7faec8" stroke-width="1" stroke-dasharray="4 3" marker-end="url(#arr2)"/>

  <!-- 2. Processing label -->
  <rect x="580" y="30" width="170" height="72" rx="4" fill="#f5eed8" stroke="#c8aa60" stroke-width="1"/>
  <text x="592" y="52" font-family="IBM Plex Mono,monospace" font-size="10" font-weight="500" letter-spacing="1" fill="#8a6800">02 PROCESSING</text>
  <text x="592" y="68" font-family="Manrope,sans-serif" font-size="11" fill="#5a4200">Arduino microcontroller</text>
  <text x="592" y="83" font-family="Manrope,sans-serif" font-size="11" fill="#5a4200">runs your sketch</text>
  <text x="592" y="98" font-family="Manrope,sans-serif" font-size="11" fill="#5a4200">dozens of times per sec</text>
  <line x1="580" y1="66" x2="403" y2="215" stroke="#c8aa60" stroke-width="1" stroke-dasharray="4 3" marker-end="url(#arr2)"/>

  <!-- 3. Actuation label -->
  <rect x="30" y="190" width="170" height="72" rx="4" fill="#d8f0e5" stroke="#6ab894" stroke-width="1"/>
  <text x="42" y="212" font-family="IBM Plex Mono,monospace" font-size="10" font-weight="500" letter-spacing="1" fill="#1a6b4a">03 ACTUATION</text>
  <text x="42" y="228" font-family="Manrope,sans-serif" font-size="11" fill="#0e3d28">Two DC gear motors</text>
  <text x="42" y="243" font-family="Manrope,sans-serif" font-size="11" fill="#0e3d28">spin the drive wheels</text>
  <text x="42" y="258" font-family="Manrope,sans-serif" font-size="11" fill="#0e3d28">controlled via H-bridge</text>
  <line x1="200" y1="230" x2="252" y2="230" stroke="#6ab894" stroke-width="1" stroke-dasharray="4 3" marker-end="url(#arr2)"/>

  <!-- 4. Power label -->
  <rect x="580" y="190" width="170" height="72" rx="4" fill="#fef8dc" stroke="#c8b040" stroke-width="1"/>
  <text x="592" y="212" font-family="IBM Plex Mono,monospace" font-size="10" font-weight="500" letter-spacing="1" fill="#8a7000">04 POWER</text>
  <text x="592" y="228" font-family="Manrope,sans-serif" font-size="11" fill="#4a3e00">Battery pack feeds</text>
  <text x="592" y="243" font-family="Manrope,sans-serif" font-size="11" fill="#4a3e00">everything. Voltage</text>
  <text x="592" y="258" font-family="Manrope,sans-serif" font-size="11" fill="#4a3e00">and capacity matter.</text>
  <line x1="580" y1="285" x2="394" y2="285" stroke="#c8b040" stroke-width="1" stroke-dasharray="4 3" marker-end="url(#arr2)"/>

  <!-- 5. Communication label -->
  <rect x="265" y="365" width="250" height="48" rx="4" fill="#f0e8f8" stroke="#a078d0" stroke-width="1"/>
  <text x="390" y="385" text-anchor="middle" font-family="IBM Plex Mono,monospace" font-size="10" font-weight="500" letter-spacing="1" fill="#6030c0">05 COMMUNICATION</text>
  <text x="390" y="402" text-anchor="middle" font-family="Manrope,sans-serif" font-size="11" fill="#40186a">Bluetooth module receives remote commands</text>
  <line x1="435" y1="365" x2="435" y2="290" stroke="#a078d0" stroke-width="1" stroke-dasharray="4 3" marker-end="url(#arr2)"/>
</svg>

Fig 1.2: The five functional systems of your course robot. Every robot on earth, from a surgical assistant to a warehouse picker, has these same five categories. Only the specific hardware changes.

When you hear an experienced builder say "I think it's a power issue" or "the sensor's lying to me," they're running this five-system diagnostic automatically. You want that instinct wired in before you touch a single component.


1.3 A tour of the project robot

The robot you'll build over this course is a two-wheeled differential-drive rover with front-facing ultrasonic sensing and Bluetooth remote control. Before you build anything, you should be able to look at the final robot (or a completed reference unit) and name every part cold. That's the goal of the lab at the end of this module.

Here's a reference diagram of the assembled robot with callouts for all major components. Study it. You'll be staring at this thing for the next several weeks.

<svg viewBox="0 0 780 440" width="100%" xmlns="http://www.w3.org/2000/svg" style="display:block;background:#1a1a18;">
  <!-- Shadow -->
  <ellipse cx="392" cy="355" rx="165" ry="22" fill="rgba(0,0,0,0.35)"/>

  <!-- Chassis plate -->
  <rect x="240" y="170" width="300" height="180" rx="14" fill="#2a2a24" stroke="#555" stroke-width="1.5"/>
  <circle cx="262" cy="192" r="5" fill="none" stroke="#444" stroke-width="1"/>
  <circle cx="518" cy="192" r="5" fill="none" stroke="#444" stroke-width="1"/>
  <circle cx="262" cy="328" r="5" fill="none" stroke="#444" stroke-width="1"/>
  <circle cx="518" cy="328" r="5" fill="none" stroke="#444" stroke-width="1"/>

  <!-- Left motor + wheel -->
  <rect x="204" y="198" width="38" height="100" rx="4" fill="#222" stroke="#555" stroke-width="1"/>
  <rect x="192" y="208" width="14" height="80" rx="7" fill="#111" stroke="#666" stroke-width="2"/>
  <line x1="193" y1="220" x2="205" y2="220" stroke="#444" stroke-width="1.5"/>
  <line x1="193" y1="232" x2="205" y2="232" stroke="#444" stroke-width="1.5"/>
  <line x1="193" y1="244" x2="205" y2="244" stroke="#444" stroke-width="1.5"/>
  <line x1="193" y1="256" x2="205" y2="256" stroke="#444" stroke-width="1.5"/>
  <line x1="193" y1="268" x2="205" y2="268" stroke="#444" stroke-width="1.5"/>
  <line x1="193" y1="280" x2="205" y2="280" stroke="#444" stroke-width="1.5"/>

  <!-- Right motor + wheel -->
  <rect x="538" y="198" width="38" height="100" rx="4" fill="#222" stroke="#555" stroke-width="1"/>
  <rect x="574" y="208" width="14" height="80" rx="7" fill="#111" stroke="#666" stroke-width="2"/>
  <line x1="575" y1="220" x2="587" y2="220" stroke="#444" stroke-width="1.5"/>
  <line x1="575" y1="232" x2="587" y2="232" stroke="#444" stroke-width="1.5"/>
  <line x1="575" y1="244" x2="587" y2="244" stroke="#444" stroke-width="1.5"/>
  <line x1="575" y1="256" x2="587" y2="256" stroke="#444" stroke-width="1.5"/>
  <line x1="575" y1="268" x2="587" y2="268" stroke="#444" stroke-width="1.5"/>
  <line x1="575" y1="280" x2="587" y2="280" stroke="#444" stroke-width="1.5"/>

  <!-- Caster wheel -->
  <circle cx="390" cy="163" r="14" fill="#1a1a18" stroke="#666" stroke-width="1.5"/>
  <circle cx="390" cy="163" r="5" fill="#444"/>

  <!-- Arduino Uno (green PCB) -->
  <rect x="268" y="192" width="108" height="76" rx="3" fill="#1a6b4a" stroke="#0e4030" stroke-width="1.5"/>
  <rect x="268" y="213" width="12" height="22" rx="2" fill="#888"/>
  <rect x="278" y="192" width="90" height="5" rx="1" fill="#111"/>
  <rect x="278" y="263" width="90" height="5" rx="1" fill="#111"/>
  <rect x="308" y="212" width="40" height="36" rx="2" fill="#111"/>
  <text x="328" y="234" text-anchor="middle" font-family="IBM Plex Mono,monospace" font-size="7" fill="#1a6b4a">ATmega</text>
  <text x="328" y="244" text-anchor="middle" font-family="IBM Plex Mono,monospace" font-size="7" fill="#1a6b4a">328P</text>
  <text x="326" y="284" text-anchor="middle" font-family="IBM Plex Mono,monospace" font-size="8" fill="#a8e8c8">ARDUINO UNO</text>

  <!-- L298N motor driver (blue) -->
  <rect x="390" y="200" width="90" height="70" rx="3" fill="#1f3f80" stroke="#1f4d8c" stroke-width="1.5"/>
  <rect x="400" y="200" width="70" height="12" rx="1" fill="#333"/>
  <line x1="415" y1="200" x2="415" y2="212" stroke="#555" stroke-width="1"/>
  <line x1="430" y1="200" x2="430" y2="212" stroke="#555" stroke-width="1"/>
  <line x1="445" y1="200" x2="445" y2="212" stroke="#555" stroke-width="1"/>
  <line x1="460" y1="200" x2="460" y2="212" stroke="#555" stroke-width="1"/>
  <text x="435" y="252" text-anchor="middle" font-family="IBM Plex Mono,monospace" font-size="7" fill="#a0c0f0">L298N</text>
  <text x="435" y="263" text-anchor="middle" font-family="IBM Plex Mono,monospace" font-size="7" fill="#a0c0f0">MOTOR</text>
  <text x="435" y="274" text-anchor="middle" font-family="IBM Plex Mono,monospace" font-size="7" fill="#a0c0f0">DRIVER</text>

  <!-- Battery holder -->
  <rect x="280" y="280" width="140" height="44" rx="4" fill="#5a5000" stroke="#c8b400" stroke-width="1.5"/>
  <rect x="418" y="292" width="10" height="20" rx="3" fill="#5a5000" stroke="#c8b400" stroke-width="1.5"/>
  <line x1="295" y1="290" x2="295" y2="316" stroke="#333" stroke-width="1"/>
  <line x1="311" y1="290" x2="311" y2="316" stroke="#333" stroke-width="1"/>
  <line x1="327" y1="290" x2="327" y2="316" stroke="#333" stroke-width="1"/>
  <line x1="343" y1="290" x2="343" y2="316" stroke="#333" stroke-width="1"/>
  <text x="350" y="306" text-anchor="middle" font-family="IBM Plex Mono,monospace" font-size="8" fill="#f5e060">4× AA BATTERY</text>

  <!-- Bluetooth HC-05 -->
  <rect x="438" y="282" width="56" height="36" rx="3" fill="#5020a0" stroke="#7030d0" stroke-width="1.5"/>
  <text x="466" y="298" text-anchor="middle" font-family="IBM Plex Mono,monospace" font-size="8" fill="#e0c8ff">HC-05</text>
  <text x="466" y="310" text-anchor="middle" font-family="IBM Plex Mono,monospace" font-size="7" fill="#c0a0ff">BLUETOOTH</text>

  <!-- Ultrasonic sensor HC-SR04 -->
  <rect x="330" y="145" width="120" height="30" rx="3" fill="#e8e4d8" stroke="#aaa" stroke-width="1.5"/>
  <circle cx="360" cy="160" r="10" fill="none" stroke="#888" stroke-width="2"/>
  <circle cx="360" cy="160" r="4" fill="#555"/>
  <circle cx="420" cy="160" r="10" fill="none" stroke="#888" stroke-width="2"/>
  <circle cx="420" cy="160" r="4" fill="#555"/>
  <path d="M338 145 Q325 160 338 175" fill="none" stroke="#c8420a" stroke-width="1" stroke-dasharray="2 2" opacity="0.8"/>
  <path d="M442 145 Q455 160 442 175" fill="none" stroke="#c8420a" stroke-width="1" stroke-dasharray="2 2" opacity="0.8"/>

  <!-- Wiring (simplified) -->
  <line x1="376" y1="268" x2="390" y2="268" stroke="#c8420a" stroke-width="1.5" opacity="0.6"/>
  <line x1="376" y1="272" x2="390" y2="272" stroke="#111" stroke-width="1.5" opacity="0.6"/>
  <line x1="242" y1="238" x2="268" y2="238" stroke="#c8420a" stroke-width="1" opacity="0.5"/>
  <line x1="538" y1="238" x2="480" y2="238" stroke="#c8420a" stroke-width="1" opacity="0.5"/>
  <line x1="242" y1="244" x2="268" y2="244" stroke="#111" stroke-width="1" opacity="0.5"/>
  <line x1="538" y1="244" x2="480" y2="244" stroke="#111" stroke-width="1" opacity="0.5"/>
  <line x1="390" y1="160" x2="328" y2="220" stroke="#888" stroke-width="1" stroke-dasharray="3 2" opacity="0.5"/>

  <!-- Callout: HC-SR04 -->
  <line x1="330" y1="152" x2="200" y2="80" stroke="#888" stroke-width="0.75" stroke-dasharray="3 3"/>
  <circle cx="200" cy="80" r="2" fill="#888"/>
  <text x="196" y="60" text-anchor="end" font-family="IBM Plex Mono,monospace" font-size="11" fill="#ddd">HC-SR04</text>
  <text x="196" y="75" text-anchor="end" font-family="Manrope,sans-serif" font-size="10" fill="#888">ultrasonic sensor</text>

  <!-- Callout: Arduino -->
  <line x1="322" y1="230" x2="190" y2="230" stroke="#888" stroke-width="0.75" stroke-dasharray="3 3"/>
  <circle cx="190" cy="230" r="2" fill="#888"/>
  <text x="186" y="220" text-anchor="end" font-family="IBM Plex Mono,monospace" font-size="11" fill="#a8e8c8">ARDUINO UNO</text>
  <text x="186" y="235" text-anchor="end" font-family="Manrope,sans-serif" font-size="10" fill="#888">microcontroller</text>

  <!-- Callout: Left motor -->
  <line x1="204" y1="250" x2="148" y2="300" stroke="#888" stroke-width="0.75" stroke-dasharray="3 3"/>
  <circle cx="148" cy="300" r="2" fill="#888"/>
  <text x="144" y="295" text-anchor="end" font-family="IBM Plex Mono,monospace" font-size="11" fill="#ddd">DC GEAR MOTOR</text>
  <text x="144" y="310" text-anchor="end" font-family="Manrope,sans-serif" font-size="10" fill="#888">left drive wheel</text>

  <!-- Callout: Motor driver -->
  <line x1="480" y1="220" x2="600" y2="150" stroke="#888" stroke-width="0.75" stroke-dasharray="3 3"/>
  <circle cx="600" cy="150" r="2" fill="#888"/>
  <text x="604" y="145" font-family="IBM Plex Mono,monospace" font-size="11" fill="#a0c0f0">L298N DRIVER</text>
  <text x="604" y="160" font-family="Manrope,sans-serif" font-size="10" fill="#888">H-bridge motor control</text>

  <!-- Callout: Battery -->
  <line x1="420" y1="302" x2="590" y2="302" stroke="#888" stroke-width="0.75" stroke-dasharray="3 3"/>
  <circle cx="590" cy="302" r="2" fill="#888"/>
  <text x="594" y="297" font-family="IBM Plex Mono,monospace" font-size="11" fill="#f5e060">BATTERY PACK</text>
  <text x="594" y="312" font-family="Manrope,sans-serif" font-size="10" fill="#888">6V / 4× AA cells</text>

  <!-- Callout: Bluetooth -->
  <line x1="494" y1="300" x2="600" y2="370" stroke="#888" stroke-width="0.75" stroke-dasharray="3 3"/>
  <circle cx="600" cy="370" r="2" fill="#888"/>
  <text x="604" y="365" font-family="IBM Plex Mono,monospace" font-size="11" fill="#e0c8ff">HC-05 BT</text>
  <text x="604" y="380" font-family="Manrope,sans-serif" font-size="10" fill="#888">Bluetooth serial</text>

  <!-- Callout: Caster -->
  <line x1="390" y1="149" x2="500" y2="80" stroke="#888" stroke-width="0.75" stroke-dasharray="3 3"/>
  <circle cx="500" cy="80" r="2" fill="#888"/>
  <text x="504" y="75" font-family="IBM Plex Mono,monospace" font-size="11" fill="#ddd">BALL CASTER</text>
  <text x="504" y="90" font-family="Manrope,sans-serif" font-size="10" fill="#888">front balance point</text>
</svg>

Fig 1.3: Annotated top-down view of the project robot. Study the position of each component relative to the chassis. In the lab, you'll match each physical part to this diagram.

A few things to notice in that diagram before you ever touch the hardware.

The sensor sits at the front because the robot needs to see what it's about to drive into. The battery sits low and centered to keep the center of mass stable. The Arduino and motor driver are on the same side of the chassis so wiring runs stay short. None of this is accidental. Every layout decision in robotics is a trade-off between wiring convenience, weight distribution, and how easy the thing is to repair.

Advanced path Look at where the caster wheel sits relative to the drive wheels. The two drive wheels form the primary load-bearing axis. The caster is the third contact point; it prevents tipping without constraining rotation. If you moved the caster behind the drive wheels instead of in front, turning behavior would change: the robot would pivot around a point behind the wheels, causing the front to swing wide. Geometry matters before you write a line of code.


1.4 Why we build this robot in particular

Why build an obstacle-avoiding rover and not, say, a robotic arm, a drone, or a line-follower? This robot forces you to confront every major challenge in robotics without needing exotic hardware or a controlled environment.

A line-follower only works on a prepared track; it teaches sensor reading but sidesteps the mess of an unpredictable world. A drone demands real-time stability control before you can even test your code. An arm teaches kinematics but nothing about navigation. The obstacle-avoider with remote control is the broadest possible robot for the fewest components.

By the time you finish this course, your robot will handle an unscripted environment (a room full of chairs, walls, and people) without being told where any of them are. That's the real target. Everything between here and Module 11 is the path to get there.

Instructor note Have a completed reference robot on the table during this module, fully assembled and powered. Let students handle it. Spin the wheels by hand. Point to the sensor. Flip it over and show the caster. Students who touch the hardware before they build it arrive at Module 2 with far better intuitions about what they're making.

If you don't have a completed unit yet, the Fig 1.3 diagram above carries most of the same load. Walk through it on screen and narrate each component's job before sending students to the lab.


Lab 01: Identify every part on a disassembled kit

You'll receive a kit with all the parts for the course robot, unassembled. Your only job in this lab is identification: no building, no wiring. Work through the steps below with the kit spread out in front of you.

  1. Find the chassis plate. Turn it over. Note the mounting holes along the edges, which are where the motors will bolt on.
  2. Pick up the Arduino Uno. Locate the USB port, the power jack, the two rows of pin headers, and the large black chip in the center. That chip is the brain. Everything else on the board exists to support it.
  3. Find the L298N motor driver module. It has a blue PCB and a metal heatsink along one edge. Locate the screw terminals, which is where the motor wires and battery wires will connect.
  4. Hold the HC-SR04 ultrasonic sensor face-on. You'll see two cylindrical elements that look like small speakers. One transmits a pulse of sound; the other listens for the echo. The time between transmit and receive tells you the distance.
  5. Find both DC gear motors. Spin the output shaft by hand and feel the resistance; that's the gearbox reducing speed and multiplying torque. Note the two wire leads coming from each motor.
  6. Locate the HC-05 Bluetooth module. It's small, purple or black, and has a row of six pins. This is what will let your phone talk to the robot.
  7. Count the AA battery slots in the battery holder. How many? What voltage does that produce? (Hint: each AA cell is 1.5V.)
  8. Using Fig 1.3 as a guide, lay all the parts out on the table roughly in the positions they'll occupy on the finished robot. Take a photo of your layout.

Module milestone Name every component in Fig 1.3 without looking at the labels, and explain in one sentence what each one does. When you can do that, you're ready for Module 2.


Self-Check: Module 1

Key Terms Glossary

Term Definition
microcontroller A tiny computer on a single chip. The Arduino Uno uses an ATmega328P. It has no operating system, so your code is the only thing running.
actuator Any device that converts electrical signals into physical movement. Motors, servos, solenoids, and pneumatic valves are all actuators.
H-bridge / motor driver A circuit that lets a low-power microcontroller control a high-current motor. Also allows reversing direction, which is essential for a drive robot.
sketch Arduino's name for a program. Contains two required functions: setup() runs once at start; loop() runs repeatedly until power is cut.
sensor A device that measures a physical property and produces an electrical signal. The HC-SR04 measures distance using ultrasonic pulses.
differential drive A two-wheel drive system where steering happens by running wheels at different speeds. No steering axle is needed because the robot pivots by varying wheel speeds.

Next: Module 02: Chassis & Drivetrain Assembly →

Related Blog Posts