Happy New Year! I’ve been playing around with the MicroView over the holidays. It’s an amazing little Arduino-compatible thingee with built-in OLED display.
It was launched on Kickstarter last year (to runaway success). After numerous delays, I finally got mine (actually, Sparkfun sent me a whole extra set for my trouble, so kudos to them). You can now buy them online and check out some technical detail.
I’ve also put together a few little demos with a retro feel:
Terminal and Screen Editor
This sketch lets you “type” directly onto the MicroView’s screen over the serial port, complete with blinking cursor! Partially inspired by the Commodore 64 screen editor.
You can move the cursor around, delete, and the Home key works (tested with PuTTY). Use CTRL-L to clear the screen. It duplicates some of what is in the MicroView library, but it also maintains a local buffer of the screen, allowing text to scroll when you hit the bottom.
Works great with either my C64 Font for MicroView (see below) or the stock 5×7 font.
Get it here: https://github.com/LeifBloomquist/MicroView/blob/master/Arduino/Terminal/Terminal.ino
MicroSwinth
This is a reinterpretation of the “Swinth Sample” demo for the Commodore 64 (http://csdb.dk/release/?id=34529) – without music of course.
You can control the display using the same keys as the original (over serial port) – H for Horizontal mirror, V for Vertical Mirror, 0-9 for tail length, and I/E to change max and min increment speeds. Space to reset.
Get it here: https://github.com/LeifBloomquist/MicroView/blob/master/Arduino/MicroSwinth/MicroSwinth.ino
10 PRINT CHR$(205.5+RND(1)); : GOTO 10
A simple randomly generated maze, using the technique highlighted in the recent MIT Press book 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 (Yes, that really is the title – see http://10print.org/ )
Works great with either my C64 Font for MicroView (see below) or the stock 5×7 font.
Get it here: https://github.com/LeifBloomquist/MicroView/blob/master/Arduino/_10PRINT/_10PRINT.ino
Commodore 64 Font for MicroView
I’ve also converted the Commodore 64 “PETSCII” font for use on the MicroView!
Note that there are actually two fonts, one for the C64’s Lowercase mode and one for the Uppercase mode. I rearranged the LowerCase one a bit so you can directly use it with uView.print(). You might have to hunt around a bit to find all the characters.
You can get them here.
https://github.com/LeifBloomquist/MicroView/tree/master/Fonts/C64Font
To install, follow the directions at http://learn.microview.io/font/creating-fonts-for-microview.html .
My modded MicroView.cpp looks like this:
... // Add header of the fonts here. Remove as many as possible to conserve FLASH memory. #include <C64FontLower.h> #include <C64FontUpper.h> #include <font5x7.h> #include <font8x16.h> #include <fontlargenumber.h> #include <7segment.h> #include <space01.h> #include <space02.h> #include <space03.h> // Change the total fonts included #define TOTALFONTS 9 #define recvLEN 100 char serInStr[recvLEN]; // TODO - need to fix a value so that this will not take up too much memory. uint8_t serCmd[recvLEN]; // Add the font name as declared in the header file. Remove as many as possible to get conserve FLASH memory. const unsigned char *MicroView::fontsPointer[]={ font5x7 ,font8x16 ,sevensegment ,fontlargenumber ,space01 ,space02 ,space03 ,C64FontLower ,C64FontUpper }; ...
To use them, simply call uView.setFontType(7); or uView.setFontType(8); in your sketch and print as normal.
More MicroView experiments to come in the new year…
Pingback: First PCB Designs! | Jamming Signal
Nice code, Leif! Scrolling terminals really very useful, I think. Thanks for the contribution.
Cheers,
Mackle
Well, loaded all the C64 screen editor, fixed the library name but it still does not take input from the keyboard. I opened the serial monitor and made sure the BAUD is correct but it does nothing.
I know the serial port is opened because it downloads to the uView and I have experimented with other
serial exchanges.
All I see is:
READY.
(cursor)
In the code you’ll see a “#define C64”, are you using a C64 or PC? Comment that line out if you’re using a PC and the USB adaptor. If using a C64, verify the RX and TX pins in the SoftwareSerial definition are correct.