Tiny Basic for Arduino is a lightweight, fast, and fully featured BASIC interpreter designed for mid-range Arduino boards and other microcontroller targets. It lets you write, edit, and run BASIC programs directly on hardware, making it a practical choice for education, rapid prototyping, and embedded experimentation.
This project brings the familiar simplicity of BASIC to embedded development. With an in-hardware editor, a broad set of built-in functions, and support for multiple targets, Tiny Basic for Arduino is well suited for:
- Teaching programming and embedded concepts.
- Prototyping small control and automation projects.
- Running BASIC scripts on supported Arduino boards.
- Exploring MCU programming without needing a full desktop application / compiler.
- In-hardware editor for writing and editing BASIC programs directly on the device.
- Support for common BASIC language constructs and control flow.
- Built-in functions for math, I/O, bit manipulation, and timing.
- Portable design that can be adapted to different MCU targets.
- Native build support for local testing and debugging.
To build the project, you will need:
- Python 3
- PlatformIO
bisonandyacc- A C/C++ build toolchain such as
build-essential.
On Debian/Ubuntu-based systems, install the required tools with:
sudo apt-get update
sudo apt-get install yacc bison build-essential
pip install -U platformioThe default environment targets the Arduino Due:
pio run -e dueTo upload the firmware to a connected board:
pio run -e due -t uploadThis step is optional and is only required when you want to validate or test parser-related functionality on a desktop machine. Hardware-specific operations are not implemented in this mode, so calling those functions may lead to unexpected results or application crashes.
pio run -e native
./tinybasic.shOnce the interpreter is running on your board, you can start with a simple program such as:
10 PRINT("HELLO, WORLD!")
20 ENDRun it with:
RUNThe project documentation is available online at:
- Tiny Basic for Arduino homepage
- Getting started guide
- Building and flashing
- Hello World example
- User manual
- Language reference
- Editor guide
- Function reference
The documentation is built with MkDocs. To generate the static HTML pages for the Tiny Basic home page and the rest of the documentation site, install the required Python packages and run the build command:
pip install -U mkdocs mkdocs-material
mkdocs buildThis will generate the HTML output under the site/ directory, including the homepage and manual pages. For local preview while editing content, you can run:
mkdocs serveThen open the local URL shown by MkDocs in your browser.
This project is licensed under the BSD 3-Clause License.
