Skip to content

Instantly share code, notes, and snippets.

#!/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]
@FoamyGuy
FoamyGuy / CircuitPython2025_Foamyguy.md
Last active January 3, 2025 18:01
#CircuitPython #CircuitPython2025

My thoughts around CircuitPython in 2025 break down broadly into general wishes and thoughts about the project and more personalized and specific thoughts, goals and ideas for myself.

For the project generally:

I am intrigued by the prospect of potentially integrating with zephyr, though some of the finer details of what this entails and what impacts it will have are over my head, from what I've understood listening to Scott talk about it in meetings and on Deep Dive there are interesting and good benefits that it could offer. I think I recall a mention or two on the possibility of using LVGL, which is definitely something I'd be happy to see happen, even if it's in a limited capacity or not fully exposed imediately. I'm also looking forward to some of the new crypto functionality being implemented primarily for circuitmatter. While I don't have specific uses for it in mind, I do have a hobbyist interest in cryptography and playing with the crypto implementations on circuitpython and microcontrollers is a

# SPDX-FileCopyrightText: 2023 Jeff Epler for Adafruit Industries
#
# SPDX-License-Identifier: MIT
import traceback
import board
from adafruit_editor import editor, picker
from adafruit_featherwing import tft_featherwing_35
import terminalio
@FoamyGuy
FoamyGuy / download_ondiskbitmap_example.py
Created January 22, 2024 18:41
Download and display a bmp file
import ssl
import wifi
import socketpool
from displayio import Group, OnDiskBitmap, TileGrid
import adafruit_requests as requests
import board
import storage
import sdcardio
import os
import board
from adafruit_dotstar import DotStar
import time
import random
# XMorse Code
"""
RGB LEDs blinking
short blinks will be red
from displayio import Group
from adafruit_display_text import label
from adafruit_displayio_layout.layouts.grid_layout import GridLayout
from adafruit_bitmap_font import bitmap_font
ASCII_CHARS = (
"`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=",
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "",
"P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", ",", ".", "/", "\\", "'",
"[", "]", ";"
# SPDX-FileCopyrightText: 2023 DJDevon3
# SPDX-License-Identifier: MIT
# ESP32-S3 Feather Weather MQTT Touchscreen
# Coded for Circuit Python 8.2.x
import traceback
import time
import board
import displayio
import terminalio
@FoamyGuy
FoamyGuy / outlined_label_tests.py
Created July 8, 2023 15:28
OutlinedLabel Early Experimends
import time
import board
import bitmaptools
import terminalio
from adafruit_display_text import bitmap_label, outlined_label
import displayio
from adafruit_bitmap_font import bitmap_font
main_group = displayio.Group()
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>SizeTest</title>
</head>
<body>
<p>Duis at consectetur lorem donec massa sapien faucibus. Eu facilisis sed odio morbi quis commodo odio. Massa tincidunt dui ut ornare lectus sit amet est. Urna nunc id cursus metus aliquam eleifend mi. At imperdiet dui accumsan sit amet. Enim praesent elementum facilisis leo. Euismod lacinia at quis risus sed vulputate. Amet dictum sit amet justo donec enim diam vulputate ut. Pulvinar sapien et ligula ullamcorper malesuada proin libero. Mauris ultrices eros in cursus turpis massa. Ultricies mi quis hendrerit dolor magna. Aliquam faucibus purus in massa tempor nec feugiat nisl. Id neque aliquam vestibulum morbi blandit cursus risus at. Porttitor eget dolor morbi non arcu risus. Elit duis tristique sollicitudin nibh sit amet. Commodo viverra maecenas accumsan lacus vel facilisis volutpat est. Vitae et leo duis ut.</p>
<p>Duis at consectetur lorem donec massa sapien faucibus. Eu facilisis sed odio morbi qui