This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Wired to the SPI headers (plus D5) | |
fram metro_m4 color | |
Vin 5v red | |
... | |
Gnd Gnd black | |
SCK SCK white | |
MISO MISO brown | |
MOSI MOSI orange | |
CS D5 blue (socket-pin) | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: Copyright (c) 2021 Randall Bohn (dexter) | |
# | |
# SPDX-License-Identifier: MIT | |
# | |
# https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling | |
import array | |
import math | |
from audiocore import RawSample | |
tone_row = [697, 770, 852, 942] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#CircuitPython2022 | |
For the Broadcom ports I would really like to have an onboard editor. | |
Something simple that would allow for stand-alone coding beyond what you can do on the REPL. | |
I would also like to explore the possibilities and limitations of MIDI on CircuitPython. | |
Dexter Starboard 2022-01-04 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: Copyright (c) 2021 Randall Bohn (dexter) | |
# | |
# SPDX-License-Identifier: MIT | |
"""LCD Widget""" | |
import time | |
import displayio | |
import terminalio | |
CHARS = 1 | |
ROWS = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# just add this to bubbles.py | |
# then call it instead of herd() | |
def singularity(group): | |
cx = display.width//2 | |
cy = display.height//2 | |
for shape in group: | |
dx = max(1, int(math.sqrt(abs(cx-shape.x)))) | |
if shape.x > cx: shape.x -= dx | |
else: shape.x += dx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import board | |
import displayio | |
display = board.DISPLAY | |
splash = displayio.Group() | |
display.show(splash) | |
n_colors = 8 | |
palette = displayio.Palette(n_colors) |