Tuesday, May 26, 2026

Part 12: The Robot Gets Its Own Brain — Raspberry Pi 3B

Let's address the obvious problem.

A robot that needs a laptop sitting next to it isn't really a robot. It's a very expensive remote control. Even the thinnest laptop on the market — say, an Asus Zenbook A14 — weighs over 2.5 lbs and measures 13×9 inches. That's not riding inside a robot. That's the robot riding inside a carry-on bag.

What we need is a way to squeeze all of that computing power into something that weighs 0.09 lbs and measures 3.4×2.3 inches.

Meet the Raspberry Pi 3B.


A Very Brief History (Bear With Us — It Actually Goes Somewhere)

Every computer you've ever used — HP desktop, Dell tower, iMac, MacBook, Lenovo ThinkPad — shares one thing in common: it runs an operating system.

Here's why that matters.

Early computers were built to do one thing. Like a calculator: give it numbers, get a result. But human needs kept growing. Eventually people wanted one machine that could handle everything at once — play music, run a word processor, open a spreadsheet, all simultaneously. That created a new problem: something needed to manage all of that traffic inside the machine. Something needed to be in charge.

That something is the operating system — the software layer that sits between the hardware and everything running on top of it. Without it, a computer is just an expensive paperweight.

Today there are four main families:

  • Unix — servers and academic/engineering workstations
  • macOS — Apple's universe
  • Windows — Microsoft's universe
  • Linux — open-source, runs on everything from supercomputers to smart fridges

Which brings us back to our tiny robot brain problem. A Raspberry Pi is too small for Windows or macOS. So it runs its own flavor of Linux called Raspberry Pi OS. Same idea, built for a credit-card-sized computer.


So What Exactly Is a Raspberry Pi?

In our CEO → Manager → Team Leader → Workers diagram, the Raspberry Pi takes over the CEO role entirely. Everything that used to live on the laptop — the Python programs, the decision-making logic, the commands to motors and sensors — now lives on a board the size of a deck of cards.

The Pi combines a processor, memory, and programmable input/output pins into one compact package. It can talk directly to motors, sensors, and cameras without a laptop anywhere in the loop.

In Phase 1, we used the laptop as CEO and Arduino Nano as Manager. From here on:

CEO + Manager (Python on Raspberry Pi) → Team Leader (Driver module) → Workers (Motors/Sensors)

The laptop's only job now is to set up the Pi. Once that's done, we can unplug and walk away. The robot thinks for itself.




What You Need

ComponentNotesEst. Cost
LaptopFor setup onlyAlready owned
Raspberry Pi 3B~$50
MicroSD card (32GB or 64GB)The Pi's "hard drive"~$18
Portable USB Power Bank (5V)Powers the Pi~$15

Step 1 — Flash the Operating System

The MicroSD card is where Raspberry Pi OS lives. We write it from the laptop using a free tool called Raspberry Pi Imager.

👉 Download and install Raspberry Pi Imager on your laptop.

👉 Insert the MicroSD card into your laptop.

👉 Open Raspberry Pi Imager:

  • Choose OS → select the Recommended option
  • Choose Storage → select your MicroSD card

👉 Before writing, click the settings gear icon and configure:

  • Hostname: anything you'll remember — e.g. pi3
  • Enable SSH → Use password authentication
  • Username and password: e.g. username pi3, password raspberry — write these down, you'll use them constantly
  • Configure wireless LAN: enter your home WiFi name and password so the Pi connects automatically on first boot

👉 Click Write and wait. Done.




Step 2 — Boot the Pi and Find Its IP Address

👉 Insert the MicroSD card into the Raspberry Pi 3B. Connect power via the micro-USB port.

👉 Wait 1–2 minutes for the Pi to boot and connect to your WiFi.

👉 Now we need to find the Pi's IP address. The easiest way: download Advanced IP Scanner (free, no installation required — just run it).

Open Advanced IP Scanner, accept the terms, click Scan. After a moment, it lists every device on your network. Look for the hostname you just set — pi3 — and note its IP address. Something like 192.168.1.42.

👉 Before moving on, download and install PuTTY on your laptop (Windows users). Mac and Linux users already have everything they need.


Step 3 — Connect via SSH

SSH lets you type commands on your laptop that actually run on the Pi. No physical keyboard or monitor attached to the Pi needed.

On Windows (PuTTY): Open PuTTY → enter the Pi's IP address in Host Name → connection type SSH → port 22 → click Open.

On macOS / Linux (Terminal):

ssh pi3@192.168.1.42

(Replace with your actual username and IP.)

When prompted for a password, type it and press Enter. The cursor won't move while you type — that's normal, it's a security feature. Hit Enter and you're in.

You should see something like:

pi3@raspberrypi:~ $

That blinking cursor is your Pi, ready for instructions.


Step 4 — Set Up Python

Raspberry Pi OS comes with Python 3 pre-installed. Run these commands to update everything and set up a clean project environment:

# Update the system
sudo apt update && sudo apt upgrade -y

# Install pip and virtual environment tools
sudo apt install python3 python3-pip python3-venv -y

# Create and activate a virtual environment
python3 -m venv my_project_env
source my_project_env/bin/activate

When you see (my_project_env) appear at the start of the command line, the environment is active. Any libraries you install from here stay contained in this project — clean, organized, no conflicts.


Step 5 — Optional: VNC for a Visual Interface

If command-line feels uncomfortable, VNC gives you a full desktop view of the Pi — mouse, icons, the works — streamed directly to your laptop screen.

👉 Download and install VNC Viewer on your laptop (RealVNC, free).

👉 Open VNC Viewer → enter the Pi's IP address → log in with your username and password.

You'll see the Raspberry Pi desktop as if you were sitting in front of a monitor connected to it.



For writing Python on the Pi, use Thonny — it comes pre-installed on Raspberry Pi OS and works exactly like PyCharm did on your laptop. Find it at: Menu (raspberry icon, top-left) → Programming → Thonny Python IDE. Write code, press F5 to run.


What Just Happened

No code was written in this part. No motors turned, no sensors blinked.

But something important happened: the robot's brain moved.

Everything that used to live on the laptop — the Python environment, the decision-making, the ability to control hardware — now lives inside a board smaller than a credit card, powered by a USB power bank, sitting on the robot itself.

The laptop's job is done. It set up the Pi and can now walk away.

In the next part, we connect the C101 4WD kit to the Pi via L298N and write Python directly on the Pi to drive the car. No laptop in the loop. No USB cable. No Arduino middleman.

The robot is about to move on its own.


Next up: Part 13 — Four wheels, one brain. The C101 meets the Raspberry Pi.