Show and tell: EVE for CircuitPython
Last week the final piece of the CircuitPython for Gameduino (and other EVE GPU-based hardware) fell into place. There's now a proper getting started page, and I'm going to claim it has reached a usability milestone.
Here's some highlights.
It's speedy
Just as my dog is pretty smart (for a dog), the bteve package is pretty fast (for Python). The quickness comes from a low-level C implementation of all the commonly-used drawing commands. Source code is here.
The performance difference is quite dramatic; it's about 4X faster than a pure Python version.
This is built into CircuitPython itself, so for the supported platforms (Metro M4, Feather M4, Raspbery Pi Pico and Teensy 4.x) it's already included.
Wii gamepad support
The Dazzler has dual Wii ports, and it continuously scans them over dual I²C channels. But decoding the bit patterns into meaningful button signals is done by the library. It's fiddly:

Fortunately somebody has already done all the work - this CircuitPython package decodes the bitfield into a neat structure. So I shamelessly lifted the code, and it's now the Dazzler's Wii decoder function.
Less math
The EVE hardware protocol uses a lot of binary fixed point arguments. The Python bindings take floating-point arguments and do the conversion for you. So Vertex2f() coordinates are in pixels, line width is also in pixels, and sprite rotations are in degrees. Much easier!Floppy driver included
Because CircuitPython comes with SDcard support built-in, adding support for the GD3X microSD slot was literally five minutes' work. At startup, the Gameduino driver attempts to mount the microSD as a filesystem. Then you can use the drive to load assets. So to load a PNG as a sprite:
gd.cmd_loadimage(0, 0)
gd.load("/sd/blinka.png")
Comes with proper documentation
Documentation for the whole EVE class is here. Right now it's comprehensive but lacks any introductory material. I plan to write some subject tutorials in the coming weeks; if there's something you want me to cover, let me know.
Thanks for reading - if you have any feedback on the EVE Python please email me at jamesb@excamera.com