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.

regards,

Robin

Well done Robin :smiley:

Dear Robin!
THank you for great BASIC for Arduino!
I made somekind of "computer" with your BASIC interpreter. I also made some changes to be able to use NOKIA5110 LCD. I have a question: have you any idea on how to upload programs trough Serial interface (trough USB)?
I am trying to hack "host_readLine()" to read from keyboard and Serial, but no luck!