Shop OBEX P1 Docs P2 Docs Learn Events
BASIC for the micro:bit — Parallax Forums

BASIC for the micro:bit

bruceebrucee Posts: 245
edited 2026-05-05 11:48 in micro:bit & Mai-Z:bot

While I write C or Tcl, when I want to build a widget on a small board I still like BASIC. It has a good mix of simplicity and built in features to take advantage of wiggling the pins.

Our BASIC is now running on the V2 micro:bit

through the same path Microsoft MakeCode uses. No external dongles. No special drivers. No SDK install.

  • 64 MHz Cortex-M4F with full hardware floating point — your math runs fast
  • Programs up to 320 KB in flash — we've already shipped a 206 KB user program with room to spare
  • 96 KB of variable space — 24,576 variables ready to go
  • Sub-millisecond timing with native SysTick, plus full 12-bit ADC for analog reads

    Instant interactivity

  • Ctrl-C interrupts a running program — one keystroke, clean prompt, no rituals

  • Auto-run on power-up — your program is in flash and running before the welcome banner finishes
  • Direct register access from BASIC — GPIO_P0_OUTSET= 1<<21 turns on an LED

    The full peripheral palette

    Drive the 5×5 LED matrix with pure BASIC. Read the edge-connector ADC with ad(1). Toggle GPIOs P0 and P1 with out()
    and in(). Time things with microsecond precision. Sort with the built-in quicksort or roll your own — both fly.
    Built-in NRF52833.bas peripheral library exposes every register at every address, ready to embed.

  • Boots from cold in 3 seconds and runs the user program

  • Bare-metal — no RTOS, no libc bloat

Comments

Sign In or Register to comment.