VGA output library for Raspberry Pi Pico using PIO state machines and DMA.
- GP0-GP2: RGB output (1 bit per channel)
- GP4: H-Sync
- GP5: V-Sync
- GP16-GP21: General purpose GPIO (controllable via serial)
- Resolution: 640x480 @ 60Hz
- Colors: 8 colors (3-bit RGB)
- Flash MicroPython to your Pico
- Upload
VGA.pyto the Pico - Run the script
Connect via USB serial terminal (115200 baud):
DEMO - 3D rotating cube demo
TEXT - Text terminal mode
BLUE/RED/GREEN - Solid color backgrounds
MULTICOLOUR - Color pattern
HELP - Show all commands
CLEAR - Clear terminal
STATUS - GPIO status
GPIO 16 ON or 1 - Turn on GP16
GPIO 17 OFF or 0 - Turn off GP17
Supported pins: GP16, GP17, GP18, GP19, GP20, GP21
fill_screen(color) # Fill entire screen
draw_pix(x, y, color) # Draw single pixel
draw_rect(x1, y1, x2, y2, color) # Draw rectangle outline
fill_rect(x1, y1, x2, y2, color) # Draw filled rectangle
draw_circle(x, y, radius, color) # Draw circle outline
fill_disk(x, y, radius, color) # Draw filled circle
draw_text(x, y, "text", color, scale) # Draw text
draw_line(x1, y1, x2, y2, color) # Draw lineBLACK, WHITE, RED, GREEN, BLUE, YELLOW, CYAN, MAGENTAUses ~31KB for framebuffer (640x480x3 bits)
Set OVCLK = True for 250MHz operation (I don't recommend it, but if you wish, you may try it.)