Those nice magnetic connectors (four pins) were waiting to be used in some small project of mine, until now.
I needed a way to peek in on a UART serial stream, but did not want to add a UI to the project or always have a laptop along for the ride. So I made what is not all that different from those old DEC VT-200 terminal consoles of old (nevermind if you are not nostalgic for those beasts).
With an RP-2040 to listen to the UART and send the text to one of those nice little Monochrome 0.96" 128x64 OLED Graphic Display.
I first used this snap on terminal concept as part of a project that was logging data to an SD card, but really any project that might need to log serial data can also have a snap on terminal added. Wire the UART to a mag connector, in my case I put 5v Power and Ground on either side while the TX and RX pins are in the middle, but there's not really a standard (until now ;) and the RX is optional as it is not used (yet). [Gnd, TX, RX, 5v]
The code for any project just needs to send serial data out via UART serial.
import busiouart1 = busio.UART(board.GP8, board.GP9, baudrate=115200)
# then Write out your messages ...
uart1.write(bytes("Hello Terminal\n", "ascii"))
The code for the terminal console monitor gadget (to listen and display) is Circuitpython. Easy with a just a bit work to get the all the previous lines of text to linefeed-up like terminals do (at least it DOES NOT using up endless green-&-white stripe fan-fold paper).
# A VT-200 like serial terminal display for RP-2040 and tiny .96" OLED Display
import board
import busio
import displayio
import time
try:
from i2cdisplaybus import I2CDisplayBus
except ImportError:
from displayio import I2CDisplay as I2CDisplayBus
import terminalio
from adafruit_display_text import label
import adafruit_displayio_ssd1306
uart0 = busio.UART(board.GP0, board.GP1, baudrate=115200)
displayio.release_displays()
oled_reset = board.GP21
# Initialize I2C on GP26 (SDA) and GP27 (SCL)
i2c = busio.I2C(scl=board.GP27, sda=board.GP26)
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
display_bus = I2CDisplayBus(i2c, device_address=0x3D, reset=oled_reset)
WIDTH = 128
HEIGHT = 64 # Change to 64 if needed
BORDER = 5
LINE_HEIGHT = HEIGHT // 6
display = adafruit_displayio_ssd1306.SSD1306(display_bus, width=WIDTH, height=HEIGHT)
# Make the display context
splash = displayio.Group()
display.root_group = splash
color_bitmap = displayio.Bitmap(WIDTH, HEIGHT, 1)
color_palette = displayio.Palette(1)
color_palette[0] = 0xFFFFFF # White
line = 0
text = ["", "", "", "", "", "", ""]
LINES = 7
text_line = [None, None, None, None, None, None, None]
for i in range(LINES):
text_line[i] = label.Label(terminalio.FONT, text=text[i], color=0xFFFFFF, x=2, y=LINE_HEIGHT * i - 1)
splash.append(text_line[i])
mode = "linefeed-up" # "linefeed-up" (fancy) OR "scan-down"
while True:
dataIn = uart0.readline()
if dataIn is not None:
line = (line + 1) % LINES
# convert bytearray to string
text[line] = ''.join([chr(b) for b in dataIn])
print(text[line], end="")
if mode == "scan-down" :
text_line[line].text = text[line]
elif mode == "linefeed-up" :
l = line
text_line[l].y = LINE_HEIGHT * -1 - 1
text_line[l].text = text[l]
text_line[l].y = LINE_HEIGHT * 6 - 1
l = (l + 1) % LINES
text_line[l].y = LINE_HEIGHT * 0 - 1
l = (l + 1) % LINES
text_line[l].y = LINE_HEIGHT * 1 - 1
l = (l + 1) % LINES
text_line[l].y = LINE_HEIGHT * 2 - 1
l = (l + 1) % LINES
text_line[l].y = LINE_HEIGHT * 3 - 1
l = (l + 1) % LINES
text_line[l].y = LINE_HEIGHT * 4 - 1
l = (l + 1) % LINES
text_line[l].y = LINE_HEIGHT * 5 - 1
Other than the wiring for the display, all you need to do is get your power and serial from the mag-connector and remember to connect the TX coming from your serial sending project to the RX on the tiny terminal.
Once you have this tiny terminal working on a project, adding a little code and mag connector to any new project is easy. Sending Serial Data out on a UART TX pin and providing a little power and ground is all that is needed to light up a very useful, retro and tiny terminal.
This page (Tiny Terminal with a Magnetic Connector) was last updated on April 14, 2026.