Skip to content

Instantly share code, notes, and snippets.

@FoamyGuy
FoamyGuy / CircuitPython2026_Foamyguy.txt
Last active January 16, 2026 19:51
#CircuitPython2026
CircuitPython 2026
I accomplished many of the things that I mentioned in my 2025 post. A few that stand out in my mind are adding
the tilepalettemapper module to the core, and gaining a much better understanding of register based drivers.
Both of which allowed me to learn a ton. I also really enjoyed working on Fruit Jam OS and the games and programs
that run inside of it.
Looking forward to 2026: A few things at the top of my mind going into this year are MIDI and RAG (Retrieval
augmented generation) based AI tools. RAG is a technique for getting better more specific and accurate results from
LLMs about specific topics by looking up key pieces of information to give context to the LLM. I started to look
import math
import bitmaptools
import displayio
import supervisor
import time
from adafruit_usb_host_mouse import find_and_init_boot_mouse
def split_points(_points):
# SPDX-FileCopyrightText: 2025 Tim Cocks for Adafruit Industries
# SPDX-License-Identifier: MIT
"""
Fruit Jam OS Launcher
"""
import array
import atexit
import json
import math
# SPDX-FileCopyrightText: 2025 Melissa LeBlanc-Williams for Adafruit Industries
# SPDX-License-Identifier: MIT
"""
An implementation of minesweeper. The logic game where the player
correctly identifies the locations of mines on a grid by clicking on squares
and revealing the number of mines in adjacent squares.
The player can also flag squares they suspect contain mines. The game ends when
the player successfully reveals all squares without mines or clicks on a mine.
"""
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
# SPDX-FileCopyrightText: Copyright (c) 2025 Tim Cocks for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
`adafruit_bmp5xx`
================================================================================
CircuitPython library for the BMP580 / BMP581 / BMP585 / etc barometric pressure sensors.
class PollyHTTPClient:
def __init__(self, requests_instance, access_key, secret_key, region='us-east-1'):
self._requests = requests_instance
self.access_key = access_key
self.secret_key = secret_key
self.region = region
self.service = 'polly'
self.host = f'polly.{region}.amazonaws.com'
self.endpoint = f'https://{self.host}'
import displayio
class SizedGroup(displayio.Group):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@property
def size(self):
min_x = 0
#!/usr/bin/python3
"""
Display a (possibly scaled) X session to a matrix
The display runs until the graphical program exits.
The display doesn't get a keyboard or mouse, so you have to use a program that
will get its input in some other way, such as from a gamepad.
For help with commandline arguments, run `python virtualdisplay.py --help`
#!/usr/bin/python3
"""
Display a (possibly scaled) X session to a matrix
The display runs until the graphical program exits.
The display doesn't get a keyboard or mouse, so you have to use a program that
will get its input in some other way, such as from a gamepad.
For help with commandline arguments, run `python virtualdisplay.py --help`
#!/usr/bin/python3
"""
Mirror a scaled copy of the framebuffer to 64x32 matrices,
The upper left corner of the framebuffer is displayed until the user hits ctrl-c.
Control scale, matrix size, and orientation with command line arguments.
python fbmirror_scaled.py [scale] [width] [height] [orientation]