Macro Microcontroller BASIC Programming Guide

Macro Microcontroller BASIC is an interpreter based on the BASIC language for microcontroller development boards, specifically the Macro Microcontroller.

Installation

  1. First, download macro-microcontroller-basic-0.0.3.uf2 from releases. Current version: 0.0.3

  2. Next, plug in your development board while holding the Boot button. A storage drive will appear on your computer.

  3. Move macro-microcontroller-basic-0.0.3.uf2 into the storage drive. Your development board is now running Macro Microcontroller BASIC!

  4. Install a serial terminal application on your computer and connect it to the board. If successful, you should see the following:

    Macro Microcontroller BASIC Version 0.0.3.
    Copyright (C) 2025-2026 Nicholas Lim.
    521928 bytes of RAM free.
    Ready.
    10

    If not, try sending PRINT "It works!". If "It works!" is sent back to the serial terminal, you have successfully installed Macro Microcontroller BASIC.

Syntax

Macro Microcontroller BASIC's syntax is similar to most other versions of BASIC:

10 <STATEMENT> <VALUE/ASSIGNMENT>
Note: Line numbers are automatically appended by the interpreter.

Statements

Predefined Values

Example Programs

Note: line numbers are automatically appended, hence there is no need to add them.