Skip to content
SQUARE MILE DESIGN®
CAT. 15 / Nov 2026

Pi Bot

A small indoor rover where a local language model picks each move and a safety layer gets the final say.

Stack
RASPBERRY PI 5 · HAILO-8L · LIDAR · ARDUINO · OLLAMA · FASTAPI
Status
IN BUILD
Date
Nov 2026
Reference
CAT. 15

Context

Branch Point put small language models in charge of a dot on a grid. Pi Bot puts one in charge of something with wheels. The question is the same, with real consequences: what does it take to let a language model drive, when a bad choice means hitting a wall?

The answer so far is to give the model as little to decide as possible. It picks an action and a duration, never a speed. Everything it chooses passes through code that can say no.

This is a preview. The hardware, the safety layer, the vision and the planner are built. The work now is calibration and longer runs.

What is built

  • The rover. An ELEGOO smart car chassis with an Arduino UNO R4 WiFi as the motor controller, a Raspberry Pi 5 with an AI HAT+ (Hailo-8L) as the brain, a Pi camera, and a 360° LiDAR.
  • A printed body. A deck, a LiDAR tower and a camera mount, each written in Python as a parametric model, so every size is a named number. Printed on a Bambu A1.
  • Three layers of no. The firmware disables the motors until armed, clamps speed, and stops on its own if no command arrives for half a second. On the Pi, a safety layer checks every command against live telemetry: it slows forward motion from 40 cm, refuses it under 20 cm, and will not drive on a low battery. The planner's rules sit on top.
  • A planner that stops when unsure. A local model through Ollama sees a short text summary of the sensors and its recent steps, and answers with JSON from a fixed list of actions: forward, back, turn by degrees, look around, go to target. A timeout, bad JSON or an unknown action becomes a stop, never a guess. The rover stands still while the model thinks, so a slow answer is never a moving hazard.
  • Vision. YOLOv8s runs on the Hailo-8L, plus strongly coloured patches reported as objects, since the detector has no class for a drinks can. Distance comes from box height after calibration.
  • Memory and a dashboard. Every step goes into SQLite: what the rover saw, what the planner chose, why, and what happened. A FastAPI dashboard on the home network shows the camera and the run.
  • Tests that run without the robot. The safety layer and the detector's output parsing are pure functions, tested on a laptop.

What comes next

Longer explore runs, a find-the-object task end to end, and a write-up of where the planner's judgement held and where the safety layer had to step in.