Main Content

It was recently BASIC’s 57th birthday, the programming language many of us first used to do any computer programming on computers from the 1970s and 1980s like the Commodore PET, Sinclair ZX Spectrum or Apple 2. Worth remembering too that part of the team that created BASIC was Sister Mary Kenneth Keller, the first woman and one of the first people in the US to get a PhD in computer science.

I’d known for a while that there was a Japanese port of TinyBASIC for the BBC micro:bit. To be honest I thought it was a bit of a novelty as you need a computer to connect to it that will be more powerful than the micro:bit and able itself to run proper BASIC, but it’s actually very, very clever. It will allow you to access features of the micro:bit itself, like the LED display, the buttons, GPIO pins and so on, meaning you can do real physical computing with the micro:bit in BASIC. You don’t need any special hardware, just a micro:bit and some sort of serial terminal on a computer connected to the micro:bit by USB.

To get it running go to – I used Google translate to help me navigate the page. Download the ZIP file and unpack the hex file and flash it to a V1 micro:bit. (It looks like it’s not yet been updated to work on the newer micro:bit with sound).

You can use terminal software to communicate with it, but it’s simpler to use Chrome and a web-based alternative. You can use the online micro:bit Python editor, but this is probably better as it handles scrolling well: The video at the top of this page shows how to set it up.

A very cool feature is that you can save files to flash memory, just as you’d save programs to cassette or disk on an 8-bit computer like the ZX Spectrum. There are 16 slots for programs, accessed with the SAVE and LOAD commands. FILES lists everything in the file system.

The program in slot 0 can be made to run automatically at start up – press button B at reset or, if on batteries, Press and hold Button A and Button B for 5 seconds, then release only Button A

You can play music out of piezo speaker attached to pin 8. It also supports NeoPixel 8×8 matrix displays, for example for displaying Japanese characters.

It also has a real time clock, though it’ll lose its time when you power off. Use
SETDATE Year, month, day, hour, minute, second
SETDATE 2021,5,3,12,0,0

There’s a lot more you can do with TinyBASIC on the micro:bit. There’s a comprehensive PDF manual in Japanese which you can translate using Google Translate to discover more.”

Link to article