This file contains hidden or 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
Turns the Adafruit ATtiny817 breakout into a Morse code output peripheral. | |
All registers are 16 bits. | |
Registers | |
00 Character Rate | |
01 Word Rate | |
02 Frequency | |
03 Duty Cycle | |
Busy pin |
This file contains hidden or 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) 2022 Randall Bohn (dexter) | |
# | |
# SPDX-License-Identifier: MIT | |
# | |
# View random products from Adafruit on the PyPortal | |
from random import randrange | |
from adafruit_pyportal import PyPortal | |
base_url = "https://adafruit.com/api/product/" | |
portal = PyPortal( |
This file contains hidden or 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) 2022 Randall Bohn (dexter) | |
# | |
# SPDX-License-Identifier: MIT | |
# A little fun in the Funhouse | |
import time | |
import board | |
import digitalio | |
import displayio | |
import vectorio | |
from adafruit_displayio_layout.layouts.grid_layout import GridLayout |
This file contains hidden or 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
Connect UART and SPI0 between to Pi devices. | |
[3v3] :: [5v] | |
GPIO2 [CTS] :: [5v] | |
GPIO3 [RTS] :: [Gnd] | |
GPIO4 [TXD?] :: GPIO14 [TXD*] | |
[Gnd] :: GPIO15 [RXD*] | |
GPIO17 [RTS] :: GPIO18 | |
GPIO27 :: [Gnd] |
This file contains hidden or 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) 2022 Randall Bohn (dexter) | |
# | |
# SPDX-License-Identifier: MIT | |
# | |
# Dice Roller | |
# Runs on Feather Bluefruit Sense nRF52840 | |
# faces: a 336x48 sprite sheet | |
import board | |
import time | |
import displayio |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |