Skip to content

Instantly share code, notes, and snippets.

View todbot's full-sized avatar
💭
doing the blink1

Tod Kurt todbot

💭
doing the blink1
View GitHub Profile
@todbot
todbot / video_production_checklist.md
Last active January 1, 2025 23:42
Checklist for Tod when uploading content to Youtube & socials

Video Production Checklist

Create the footage

  • Record video / performance
  • Verify video framing is good
  • Verify audio is good (no clipping, no dropouts, stereo isn't wonky)
  • Re-record until good
  • Sync video file to Mac
  • Post-produce video (reframe, fix color grade, add hipster effects)
@todbot
todbot / many_neopixel_strips.ino
Created December 6, 2024 23:53
Show many neopixel strips in use simultaneously using Adafruit_NeoPixel
// Show many neopixel strips in use simultaneously using Adafruit_NeoPixel
//
// 2024Dec12 - @todbot
// compiles, not tested
#include <Adafruit_NeoPixel.h>
#define NUM_STRIPS 3
const int pin_for_strip[] = {A0, A2, 5};
@todbot
todbot / pico_sdk_setup.sh
Created November 27, 2024 20:22
# Pico-SDK setup and compile for Pico W as of 2024 Nov
# Pico-SDK setup and compile as of 2024 Nov
git clone https://github.com/raspberrypi/pico-sdk/
git clone https://github.com/raspberrypi/pico-examples
# set up the sdk
cd pico-sdk
export PICO_SDK_PATH=`pwd`
git submodule update --init
@todbot
todbot / two_pot_drone_synth.py
Last active December 27, 2024 00:08
Drone synthing using two knobs to control three voices in synthio with optional echo effect in CircuitPython
# two_pot_drone_synth.py -- Use two knobs to control three voices in synthio
# with optional echo effect
# 25 Nov 2024 - @todbot / Tod Kurt
# video demo: https://www.youtube.com/watch?v=xEmhk-dVXqQ
# original simpler version:
# https://gist.github.com/todbot/53bfa7333ac7c1fcff8eaf0f547556ff
import time, random
import board, keypad, analogio
import audiopwmio, audiomixer, synthio
@todbot
todbot / bouncy_balls_vectorio.py
Last active November 14, 2024 01:10
use displayio and vectorio to make simple bounch balls in CircuitPython
# 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
// 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
@todbot
todbot / pico_i2c_test.ino
Last active November 9, 2024 18:53
Test pico-sdk i2c functions in Arduino, in this case reading TouchwheelSAO
// 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
@todbot
todbot / as1115_test.ino
Created November 8, 2024 22:55
simple AS1115 LED driver demo, for the Supercon "petal" SAO, in Arduino
// 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:
@todbot
todbot / touchio_debug_code.py
Created October 15, 2024 22:37
Debug raw touchio values in CircuitPython
# 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
@todbot
todbot / synthy-balls.py
Last active October 4, 2024 13:27
use rotary encoder to launch balls that play notes when bouncing in CircuitPython
# 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