Pico Logo

July 3, 2026 · View on GitHub

Pico Logo is a lightweight, modular Logo interpreter written in C, designed for RP2350-based boards: the Raspberry Pi Pico 2, the Raspberry Pi Pico 2 W, and the Pimoroni Pico Plus 2 W. The project aims for compatibility with classic LCSI Logo semantics, although it is influenced by classic MIT Logo semantics, focusing on clarity, maintainability, and resource efficiency.

sqiral

repeat 220 [ fd repcount rt 88 ]

Goals

  • Enable learning and experimentation with Logo using classic resources.
  • Provide a clear, maintainable codebase for future enhancements (graphics, sound, hardware integration).
  • Ensure efficient operation on resource-constrained hardware.

Features

  • Classic Logo Semantics: Compatible with Logo books and manuals from the 1980s and 1990s.
  • Modular Core: Primitives and interpreter logic are organized for clarity and extensibility.
  • REPL Interface: Interactive terminal-based read-eval-print loop with friendly error messages.
  • Multi-line Input: Supports procedure definitions spanning multiple lines.
  • Basic Constructs: Variables, procedures, control structures (if, repeat), lists, arithmetic, and logical operations.
  • Device Abstraction: Core logic separated from device-specific code for portability.
  • Host & Pico Support: Runs on desktop for development; targets three RP2350 boards (Pico 2, Pico 2 W, Pico Plus 2 W).
  • Single-Precision Math: Uses 32-bit floats for numerical calculations, with fallback for integer-only hardware.
  • File I/O: Manage files (catalog, setprefix, erasefile) and load and save Logo programs, backed by an internal LittleFS filesystem at / and a FAT32 SD card mounted at /sd.
  • Networking (WiFi boards): WiFi (wifi.connect, wifi.scan), DNS resolution, NTP time, ping, and an HTTP client (http.get, http.post, http.put, http.patch, http.delete) with JSON read/build primitives. Plain http:// works on all WiFi boards; https:// requires a TLS-capable (PSRAM) board.
  • Unit Testing: Uses Unity and CMake for isolated, maintainable tests.

Additional Features for the PicoCalc

  • 320×320 resolution turtle graphics with 256 colours (from a palette of 65K colours)
  • Three simultaneous display modes: full screen text for programs without graphics, full screen graphics for running graphical programs, and split screen for interactive use
  • Full line editing and history
  • Full display text editor (edit procedures, variables and files)
  • Access to PicoCalc hardware (battery status, power control)
  • One of the supported RP2350 boards, for hardware-supported floating-point:
    • Raspberry Pi Pico 2 (4 MB flash, no radio) — offline
    • Raspberry Pi Pico 2 W (4 MB flash, WiFi) — adds networking and plain http://
    • Pimoroni Pico Plus 2 W (16 MB flash, 8 MB PSRAM, WiFi) — adds https:// and larger responses
  • PicoCalc device with the latest firmware

Learn Logo

Pico Logo follows the LCSI dialect, however, basic logo and turtle graphics from the follow books should work without or minor modifications.

The best place to start is the included Pico Logo Reference. Continue your learning journey with the following books.

Many more books are freely available on the internet.

Contributing

The following information will allow you to configure your development environment.

Dependencies

Install the following with Homebrew:

brew install cmake pandoc librsvg
brew install --cask font-iosevka
brew install --cask basictex

After installing BasicTeX, add the required LaTeX packages:

sudo tlmgr update --self
sudo tlmgr install latexmk framed

Note

You may need to restart your terminal after installing BasicTeX for the TeX commands to be available, or run eval "$(/usr/libexec/path_helper)".

Visual Studio Code

Visual Studio Code is recommended to build Pico Logo. You will need the following extensions:

The CMake Tools extension should be installed and I recommend learning how to use it and how it integrates with the test explorer.

Directory Structure

  • core/ — Interpreter logic and primitives
  • devices/ — Device-specific code (host/, picocalc/)
  • reference/ — Language reference, error messages, and documentation
  • tests/ — Unit tests (Unity framework)
  • tools/ — Host-side utilities (e.g. mklfsimg, the LittleFS image builder)

Building and Running

This project uses CMake presets for all common configurations.

Host (desktop) REPL

Release build:

cmake --preset=host
cmake --build --preset=host
./build-host/logo

Debug build:

cmake --preset=host-debug
cmake --build --preset=host-debug
./build-host-debug/logo

Unit tests

cmake --preset=tests
cmake --build --preset=tests
ctest --preset=tests

For coverage builds, use the tests-coverage preset instead of tests.

Pico firmware (RP2350)

Choose the preset for your board:

  • pico2 — Raspberry Pi Pico 2 (offline)
  • pico2w — Raspberry Pi Pico 2 W (WiFi, http:// only)
  • pico+2w — Pimoroni Pico Plus 2 W (WiFi + PSRAM, https://)
cmake --preset=pico2w
cmake --build --preset=pico2w

This produces build-pico2w/pico-logo.uf2 (each preset builds into its own build-<preset> directory), which you can flash with picotool or by copying to the Pico’s USB mass‑storage device.

Scripts

flash.sh

A helper script to flash the Pico firmware. It uses openocd under the hood to program the device via SWD.

./flash.sh

dist.sh

A helper script to create a release files of the project, including documentation, and build artifacts. The dist directory is created to hold the release files.

./dist.sh

About Logo

  • Mindstorms by Seymour Papert
  • Logo's Lineage by Ian Chadwick
  • History of Logo by Cynthia Solomon, Brian Harvey, Ken Kahn, Henry Lieberman, Mark L. Miller, Margaret Minsky, Artemis Papert, Brian Silverman
  • Logo Philosophy and Implementation by Seymour Papert, Clotilde Fonseca, Geraldine Kozberg and Michael Tempel, Sergei Soprunov and Elena Yakovleva, Horacio C. Reggini, Jeff Richardson, Maria Elizabeth B. Almeida, David Cavallo
  • Logo Tree project by Pavel Boytchev

Credits

Pico Logo was created by an experienced software engineer collaborating with Claude Code.

This is my safe, side open-source project where I experiment with agentic engineering. I am not making a point on what can be or not be done in this new world where we find ourselves. This is not an example of vibe coding. I am applying engineering principles vigoroursly.

License

Copyright 2026 Blair Leduc
See LICENSE for details.