Spanda

Spanda 101

A hands-on tutorial series for learning Spanda from your first robot program through deployment verification.

Each lesson links to a runnable example in the repo. Work through them in order, or jump to a topic you need.

Prefer plain English first? See Spanda for Dummies (~45 min, no jargon).

All tutorials: Tutorials index

Prerequisites: Installation and a built CLI (npm run build:rusttarget/release/spanda).


Curriculum

# Lesson Example Time
1 Hello, robot examples/basics/01_minimal_robot.sd 10 min
2 Sensors and safety examples/basics/02_sensors_and_safety.sd 15 min
3 Control flow and loops examples/basics/03_control_flow.sd 15 min
4 Types, units, and errors examples/basics/04_result_and_option.sd 20 min
5 Modules and traits examples/basics/05_traits_and_impl.sd 20 min
6 AI and the safety gate examples/showcase/rover_navigation.sd 25 min
7 Tasks, triggers, and concurrency examples/integration/triggers_minimal.sd 25 min
8 Hardware profiles and verify examples/integration/verify_walkthrough.sd 20 min
9 Packages and tests examples/basics/07_in_language_tests.sd 20 min
10 End-to-end patrol examples/end_to_end/safe_patrol/ 30 min

Total: ~3 hours at a comfortable pace.


After Spanda 101

Next step Resource
All tutorials Tutorials index
Flagship safety demo killer-demo.md + examples/showcase/killer_demo.sd
Language reference spanda-language.md
Full API index spanda-reference.md
Real-time & replay realtime.md, replay.md
Verification & health health-checks.md, kill-switch.md
Live AI & IoT live-ai-provider.md, iot.md
Debugging debugging.md
Examples library examples/README.md
Package examples examples/packages/README.md

How to use these tutorials

  1. Read the lesson.
  2. Open the linked .sd file in your editor.
  3. Run the commands in the Try it section.
  4. Complete the Exercise (optional) before moving on.

All commands assume you are in the repository root and spanda is on your PATH (or use ./target/release/spanda).