PiccoloBASIC – A BASIC interpreter for the Raspberry Pi Pico board

PiccoloBASIC is an open-source BASIC interpreter for the Raspberry Pi Pico development board that’s based on “uBASIC: a really simple BASIC interpreter” by Adam Dunkels and relying on Arm’s LittleFS fail-safe filesystem for microcontrollers.

If my memory serves me well, my first computing experience was at school using a Thomson TO7 computer that we programmed with BASIC. I don’t think the language is still used in practical applications, but we can still see some BASIC projects pop up from time to time such as a BASIC interpreter for the Arduino Zero boards. Gary Sims, owner of the Gary Explains YouTube channel, has now ported a BASIC interpreter to the Raspberry Pi Pico.

 

Raspberry Pi Pico BASICThe project is still work in progress, but currently implemented features include:

  • Let, if, print, for, goto, gosub
  • String variables (let z$=”hello”)
  • Floating point numbers and variables (let z#=1.234)
  • Builtin functions [zero, randint, not, time]
  • Sleep, delay, randomize, push & pop (for integers)
  • Maths functions like cos, sin, tan, sqr, etc
  • LittleFS support
  • Rudimentary GPIO support

But it’s still good enough for Hello World, Blinky, and other code samples. Here’s what Hello World looks like:

Raspberry Pi Pico’s 2MB flash has been partitioned to have the first 640KB for the PiccoloBASIC firmware, and the rest for LittleFS to add BASIC programs, Python scripts, and so on. Besides fixing a few bugs, Gary plans to work on more features such as peek and poke, longer variable names (currently just one letter), support for negative, 64-bit, and hex numbers, better loops (steps, reverse, while, etc..), File IO, and more hardware support with I2C, SPI, Bluetooth, USB keyboard, etc…

You’ll find the source code and more details on GitHub, and an introduction video on Gary Explains’ YouTube channel.YouTube video player

Note that it’s not the only BASIC interpreter for Raspberry Pi Pico as other projects that come up include PicoMite running the free MMBasic interpreter and JustPicoBasic by bgolab.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard

6 Replies to “PiccoloBASIC – A BASIC interpreter for the Raspberry Pi Pico board”

    1. This TinyBasic is GPL. (for an embedded/combined program!) So it may be very bad as it’s hard to set boundaries on small cpu.

      1. Check out mmbasic…go noto the backshed forum and see the materials
        Or search fir pucomite
        Fully featured with arrays…interrupts…lcd support etc
        Basic is still useful

  1. Man, there is really a lot of real things to do. Micropython could use a lot of work, and the whole ecosystem. Why not contribute to a meaningful project instead? Is that not even better still? Granted a lot of people waste a lot of time on a lot of stuff but two wrongs don’t make a right…

Leave a Reply

Your email address will not be published. Required fields are marked *

Boardcon Rockchip and Allwinner SoM and SBC products
Boardcon Rockchip and Allwinner SoM and SBC products