Gameduino CircuitPython

The bteve package lets you drive the Gameduino 3X series of display adapters directly from CircuitPython. It's an accelerated driver for BridgeTek's EVE series GPUs, with enhancements for CircuitPython and the Gameduino 3X family.

Contents

Hardware

It runs out of the box on these CircuitPython MCUs:

  • Adafruit M4 Metro and Feather M4 Express
  • Teensy 4.x
  • Raspberry Pi Pico

The Gameduino 3 and 3X devices are supported:

  • Gameduino 3 and 3X 4.3" LCD with touch screen
  • Gameduino 3X 7" LCD
  • Gameduino 4X Dazzler with HDMI 720p output

Installation

The bteve package is included in the CircuitPython Community Library Bundle. Download the circuitpython-community-bundle-7.x-mpy-xxxxxxxx.zip file, extract the contents, and copy the bteve folder into the lib folder on your device's CIRCUITPY drive.

First Examples

This short program will run on any Gameduino, drawing "Hello World" in the center of the screen:

import bteve as eve

gd = eve.Gameduino()
gd.init()

gd.ClearColorRGB(0x20, 0x40, 0x20)
gd.Clear()
gd.cmd_text(gd.w // 2, gd.h // 2, 31, eve.OPT_CENTER, "Hello world")
gd.swap()

EVE uses an immediate-mode API: everything gets drawn every frame. This example draws 100 random circles 60 times per second:

import random
import bteve as eve

rr = random.randrange

gd = eve.Gameduino()
gd.init()

while True:
    gd.Clear()
    gd.Begin(eve.POINTS)
    for i in range(100):
        gd.ColorRGB(rr(256), rr(256), rr(256))
        gd.PointSize(rr(100))
        gd.Vertex2f(rr(gd.w), rr(gd.h))
    gd.swap()

There are more examples in the examples directory in the repo.

Documentation

The complete bteve documentation is available at readthedocs.