Skip to content

Instantly share code, notes, and snippets.

Avatar

Randall Bohn rsbohn

  • Rando Media
  • Orem Utah USA
View GitHub Profile
@rsbohn
rsbohn / snowflakes.py
Created Dec 6, 2021
another displayio demo
View snowflakes.py
# SPDX-FileCopyrightText: Copyright (c) 2021 Randall Bohn (dexter)
#
# SPDX-License-Identifier: MIT
"""snowflakes"""
# like bubbles but they fall from they sky
# circup install adafruit_display_shapes
# circup install adafruit_fancyled
import random
import time
import displayio
@rsbohn
rsbohn / bubbleface.py
Created Dec 5, 2021
Put bubbles on your face (LED Glasses)
View bubbleface.py
# SPDX-FileCopyrightText: Copyright (c) 2021 Randall Bohn (dexter)
#
# SPDX-License-Identifier: MIT
"""Bubbles on your face (LED Glasses)"""
# circup install adafruit_display_shapes
# circup install adafruit_fancyled
import random
import time
import displayio
@rsbohn
rsbohn / bubbles.py
Created Dec 4, 2021
another displayio demo
View bubbles.py
# SPDX-FileCopyrightText: Copyright (c) 2021 Randall Bohn (dexter)
#
# SPDX-License-Identifier: MIT
"""Bubbles"""
# circup install adafruit_display_shapes
# circup install adafruit_fancyled
import random
import time
import displayio
import framebufferio
View terminal_vt100.py
# SPDX-FileCopyrightText: Copyright (c) 2021 Randall Bohn (dexter)
#
# SPDX-License-Identifier: MIT
"""
Demonstrate usage of the terminalio module.
The module provides a VT100 emulation within a displayo.TileGrid.
A good reference for VT100 "escape" codes is found at
https://www.csie.ntu.edu.tw/~r92094/c++/VT100.html
"""
@rsbohn
rsbohn / color_gradient_rgb.py
Last active Dec 2, 2021
Colors in RGB Space
View color_gradient_rgb.py
import time
import board
import displayio
display = board.DISPLAY
splash = displayio.Group()
display.show(splash)
n_colors = 8
palette = displayio.Palette(n_colors)
View display_shapes0.py
# SPDX-FileCopyrightText: Copyright (c) 2021 Randall Bohn (dexter)
#
# SPDX-License-Identifier: MIT
"""Display Shapes Demo"""
import math
import time
import board
import displayio
from adafruit_display_shapes.circle import Circle
from rainbowio import colorwheel
View vectorio_shapes.py
# SPDX-FileCopyrightText: Copyright (c) 2021 Randall Bohn (dexter)
#
# SPDX-License-Identifier: MIT
"""Vectorio 2D Shapes"""
import random
import time
import board
import displayio
import vectorio
from rainbowio import colorwheel
@rsbohn
rsbohn / hello_vectorio.py
Created Nov 29, 2021
Vectorio and Displayio
View hello_vectorio.py
# SPDX-FileCopyrightText: Copyright (c) 2021 Randall Bohn (dexter)
#
# SPDX-License-Identifier: MIT
"""A first look at Vectorio"""
import time
import board
import displayio
import vectorio
display = board.DISPLAY
@rsbohn
rsbohn / hello_bitmap.py
Created Nov 29, 2021
Color Bitmaps on Displayio
View hello_bitmap.py
# SPDX-FileCopyrightText: Copyright (c) 2021 Randall Bohn (dexter)
#
# SPDX-License-Identifier: MIT
"""A first look at DisplayIO"""
import time
import board
import displayio
import vectorio
display = board.DISPLAY
View uptime_qr.py
# SPDX-FileCopyrightText: 2021 Randall Bohn
#
# SPDX-Licence-Identifier: MIT
"Uptime QR Code"
import time
import displayio
from adafruit_featherwing import tft_featherwing_35
from adafruit_bitmap_font.bitmap_font import load_font