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
// lightly modified to print out the top level directory as strings, | |
// like for use with a display | |
/********************************************************************* | |
Adafruit invests time and resources providing this open source code, | |
please support Adafruit and open-source hardware by purchasing | |
products from Adafruit! | |
MIT license, check LICENSE for more information | |
Copyright (c) 2019 Ha Thach for Adafruit Industries |
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
# builds on John Park's Parsec on drawing circle https://www.youtube.com/watch?v=nI55N6q0sUo | |
import math | |
import time | |
import random | |
# Set up the display | |
display = board.DISPLAY | |
# Create a blank displayio group | |
group = displayio.Group() |
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 board | |
import displayio | |
import math | |
import time | |
# Set up the display | |
display = board.DISPLAY | |
# Create a blank displayio group | |
tilegroup = displayio.Group() |
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
// Port of code at https://efundies.com/src/arduino/midi-solenoids.ino | |
// to use fortyseveneffects MIDI library and Adafuit_TinyUSB | |
// Be sure to set Tools -> USB Stack: Adafruit TinyUSB in Arduino IDE | |
#include <Adafruit_TinyUSB.h> | |
#include <MIDI.h> | |
// USB MIDI object | |
Adafruit_USBD_MIDI usb_midi; | |
// Create a new instance of the Arduino MIDI Library, | |
// and attach usb_midi as the transport. |
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
# led animations + audio on RP2040 Pico | |
# | |
import os, time, random | |
import board, keypad | |
import audiomixer, audiocore | |
import audiopwmio | |
import neopixel | |
from adafruit_led_animation.animation.rainbow import Rainbow | |
from adafruit_led_animation.animation.rainbowchase import RainbowChase | |
from adafruit_led_animation.animation.rainbowcomet import RainbowComet |
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) 2023 Tod Kurt | |
# | |
# SPDX-License-Identifier: MIT | |
""" | |
`sleepy_keys` | |
============= | |
HID System Control Powerdown / Sleep / Wake device helper library | |
* Author(s): Tod Kurt |
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
# usb_host_midi_demo.py - demo new USB MIDI Host capability in CircuiPython | |
# 27 Nov 2023 - @todbot / Tod Kurt | |
# adapted from https://github.com/adafruit/Adafruit_CircuitPython_USB_Host_MIDI/blob/main/examples/usb_host_midi_simpletest.py | |
# needs "circup install adafruit_midi adafruit_usb_host_descriptors" | |
# and hand-copy library from https://github.com/adafruit/Adafruit_CircuitPython_USB_Host_MIDI | |
import time | |
import board | |
import usb.core | |
import adafruit_usb_host_midi | |
import adafruit_midi |
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
# phase accumulation oscillator experiment | |
# 13 Nov 2023 - @todbot | |
# basically just copying | |
# https://github.com/wntrblm/Sol/blob/master/firmware/winterbloom_sol/lfo.py | |
# | |
import time | |
import math | |
from supervisor import ticks_ms |
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
# "output" a waveform of a given length at a given frequency | |
import time | |
import math | |
# frequency in Hz of wave | |
frequency = 3 | |
# length of the wave, number of samples in the wave | |
LENGTH = 13 |
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
# diagnose https://old.reddit.com/r/circuitpython/comments/17snve6/trouble_with_ssd1306_and_asyncio/ | |
# 11 Nov 2023 | |
import asyncio | |
import random # for creating synthetic data | |
import time | |
import board | |
import digitalio | |
import busio | |
import displayio | |
import adafruit_displayio_ssd1306 |