Arduino BASIC with PS/2 Keyboard + OLED Screen

Hi All,

As a fun little project, I've ported a BASIC interpreter I was writing to the arduino, and got it running with an OLED 128x64 screen and a PS/2 Keyboard. The end result is roughly equivalent to a Sinclair ZX81 (my first computer!). The BASIC is roughly Sinclair BASIC, but I've made string arrays and string handling more like BBC BASIC, since I prefer that to the Sinclair equivalent.

Video and code on:

Its a fairly complete BASIC (i.e. not a Tiny Basic), with proper variable names, float and strings and mutli-dimensional arrays. You can also save and load to the EEPROM, and access the arduino digital and analog pins.

I'd like to add support for Servos, but I'm running out of room on the FLASH memory - so this will have to wait until I've optimised the code a bit.

Because the Adafruit SSD1306 OLED library uses too much RAM+FLASH space, I've used the SSD1306ASCII library - however this is really slow (It uses ShiftOut to do SPI).

I've hacked this library a bit to do faster software SPI (by merging in some code from the Adafruit Library/Nick Gammon?) and speeded it up by a factor of about 4. This is available on the github repo as a ZIP file if anyone else is using the lighweight SSD1306ASCII for their projects but wants a bit more speed.

(also cross-posted to the Displays forum - since the speeded up library may be of interest)

regards,

Robin

This is extremely cool!

I was considering putting together something like this, just for the "old school" feel, but you beat me to it.

I'll be pulling down your source and looking over it.

As it so happens, I've been working on an Arduino soft keyboard for another project of mine.

Since my keyboard would use most of the pins available on the Arduino, I figured I would embed a Nano as a keyboard controller, then access the keyboard through a serial or I2c interface.

Want to compare notes sometime and see if we can't cross this with your BASIC machine?

Great job!

Nice Project!

How complicated would it be to change from the OLED display to use the TVout library?