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
# bouncy_balls_vectorio.py - use displayio to make simple bounce balls | |
# 12 Nov 2024 - @todbot / Tod Kurt. Based off bouncy_balls1.py | |
import time, random | |
import board, busio, displayio, i2cdisplaybus | |
import vectorio | |
import adafruit_displayio_ssd1306 | |
# configuration options | |
num_balls = 12 | |
ball_size = 5 |
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
// touchwheelsao_test.ino -- test TouchwheelSAO in Arduino | |
// 5 Nov 2024 - @todbot / Tod Kurt | |
// assumes usuing arduino-pico arduino core | |
// tune the Wire setup to match your system | |
#include <Wire.h> | |
const int i2c_addr = 0x54; | |
//const int i2c_addr = 0x56; // tod's test wheel |
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
// pico_i2c_test.ino -- test pico-sdk i2c functions in Arduino, in this case reading TouchwheelSAO | |
// 9 Nov 2024 - @todbot / Tod Kurt | |
// demo using pico-sdk i2c functions inside of Arduino sketch | |
// copies from https://github.com/raspberrypi/pico-examples/blob/master/i2c/lis3dh_i2c/lis3dh_i2c.c | |
// assumes compiling with arduino-pico Arduino core for Pico/PicoW | |
#include <Wire.h> | |
#define _i2c_dev i2c0 | |
#define _clkHz 400000 |
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
// as1115_test.ino -- simple AS1115 LED driver demo, for the Supercon "petal" SAO | |
// 1 Nov 2024 - @todbot / Tod Kurt | |
// written for arduino-pico Arduino core, but should be usable for others | |
#include <Wire.h> | |
// simple class for dealing with AS1115 LED driver chip: | |
// https://ams-osram.com/products/drivers/led-drivers/ams-as1115-led-driver-ic | |
class AS1115_test { | |
public: |
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
# touchio_debug_code.py -- debug raw touchio values | |
# 15 Oct 2024 - @todbot / Tod Kurt | |
# This sketch shows the raw_value and threshold value for each | |
# touchio TouchIn input, as well as the normal ".value" boolean | |
# Hopefully this will help to debug touchio circuits. | |
import time | |
import board | |
import touchio |
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
# synthy-balls.py -- use rotary encoder to launch balls that play notes when bouncing | |
# 20 Aug 2024 - @todbot / Tod Kurt | |
# video demo: https://youtu.be/cCTPtk6KQQk | |
import time, random, math | |
import board | |
import busio, displayio, terminalio | |
import rotaryio, keypad | |
import audiobusio, audiocore, audiomixer, synthio | |
import gc9a01 | |
#from adafruit_display_text import bitmap_label as label |
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
# mp3-cycler.py -- Play high-quality MP3s on RP2350 Tiny 2350 | |
# using the MacroPadSynthPlug as audio interface | |
# 15 Aug 2024 - @todbot / Tod Kurt | |
import time, os, random | |
import board | |
import audiocore, audiopwmio, audiomixer, audiomp3 | |
import busio | |
import keypad | |
import rainbowio |
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
# derpnote2-rp2350.py - My sound piece attempting to recreate the THX "Deep Note" sound, with display | |
# 14 Aug 2024 - @todbot / Tod Kurt | |
# | |
import asyncio | |
import board, audiopwmio, audiomixer, audiocore, synthio, random, time | |
import busio, displayio, terminalio, vectorio | |
import keypad | |
import neopixel | |
import adafruit_displayio_ssd1306 | |
from adafruit_display_text import bitmap_label as label |
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
# random-boops.py - demo CircuitPython synthio on SparkFun Pro Micro RP2350 | |
# 13 Aug 2024 - @todbot | |
# | |
import board, audiopwmio, audiomixer, audiocore, synthio, random, time | |
import neopixel | |
audio = audiopwmio.PWMAudioOut(board.D9) | |
synth = synthio.Synthesizer(sample_rate=22050) | |
audio.play(synth) | |
synth.envelope = synthio.Envelope(sustain_level=0.8, release_time=0.1, attack_time=0.001) | |
led = neopixel.NeoPixel(board.NEOPIXEL, 1, brightness=0.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
# bouncy_jpheads.py - use displayio to make simple bounch balls | |
# orignally from: https://gist.github.com/todbot/6f082f452806fad9cd4702c2f1b0aed4 | |
# 30 Jul 2024 - @todbot | |
import time, random | |
import board, displayio, terminalio | |
from adafruit_display_text import label | |
import adafruit_imageload | |
display = board.DISPLAY # CP already sets up display for us, 240x135 for LILYGO T8 ESP32-S2 | |
screen = displayio.Group() # a main group that holds everything |
NewerOlder