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
# bitmapfilter_play3_code.py -- chops + blur on random lines | |
# 2 Apr 2024 - @todbot / Tod Kurt | |
import time, math, random | |
import board | |
import rainbowio | |
import vectorio | |
import displayio | |
import bitmaptools | |
import bitmapfilter | |
import gc |
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
# bitmapfilter_play2_code.py -- spirograph fun w/ bitmapfilter | |
# 1 Apr 2024 - @todbot / Tod Kurt | |
import time, math, random | |
import board | |
import rainbowio | |
import vectorio | |
import displayio | |
import bitmaptools | |
import bitmapfilter |
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
# Make an internet clock with CircuitPython using WorldTimeAPI.org | |
# 31 Mar 2024 - @todbot / Tod Kurt | |
# Use resulting strings for displaying on a display of some kind | |
import os, time | |
import wifi | |
import adafruit_requests | |
import socketpool | |
import ssl | |
time_url = "http://worldtimeapi.org/api/ip" |
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
""" | |
LilyGo T-Display S3 display hand-setup. Not normally required if using https://circuitpython.org/board/lilygo_tdisplay_s3/ | |
""" | |
import time | |
import board | |
import digitalio | |
import displayio | |
import paralleldisplaybus | |
import adafruit_st7789 |
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
# audiomixer_demo_i2s.py -- show how to fade up and down playing loops | |
# Code based on that of https://github.com/todbot/circuitpython-tricks/blob/main/larger-tricks/audiomixer_demo.py | |
# where you can also find the WAV files used | |
# 30 Nov 2022 - @todbot / Tod Kurt | |
import time | |
import board | |
import audiocore | |
import audiomixer | |
import audiobusio |
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
# code.py example for color_palette_finder.py | |
# 9 Mar 2024 - @todbot / Tod Kurt | |
# Needs 'color_palette_finder.py' library | |
# video demo: https://youtu.be/dSR6IVxeaTg | |
import time | |
import board | |
import displayio | |
import vectorio | |
import gc |
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
# Compute the average (median or mean) color of a JPEG using ulab.numpy | |
# 9 Mar 2024 - @todbot / Tod Kurt | |
# Note: test images are included as comment below, max tested resolution 256x192 | |
import ulab.numpy as np | |
import displayio | |
import jpegio | |
def rgb565_to_rgb888(v, swapped=True): | |
"""Convert RGB565 (normal or swapped) to RGB888 tuple""" | |
if swapped: |
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
# generated by PrusaSlicer 2.2.0+ on 2020-04-02 at 04:02:32 UTC | |
[print:0.175mm - Monoprice Mini Select v2] | |
avoid_crossing_perimeters = 0 | |
bottom_fill_pattern = rectilinear | |
bottom_solid_layers = 3 | |
bottom_solid_min_thickness = 0 | |
bridge_acceleration = 0 | |
bridge_angle = 0 | |
bridge_flow_ratio = 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
// from: | |
// https://docs.arduino.cc/retired/library-examples/wifi-library/WiFiWebClient/ | |
#include <WiFi.h> | |
// Enter your WiFi SSID and password | |
char ssid[] = "todbot"; // your network SSID (name) | |
char pass[] = "testtesttest"; // your network password (use for WPA, or use as key for WEP) | |
char server[] = "wifitest.adafruit.com"; // host name address for adafruit test |
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
# synthio_midi_synth.py - pretty usable MIDI-controlled synth using synthio in CircuitPython | |
# 11 May 2023 - @todbot / Tod Kurt | |
# Uses cheapie PCM5102 DAC on QTPY RP2040 | |
# Video demo: https://www.youtube.com/watch?v=N-PbbWWDE6k | |
# Features: | |
# - midi velocity controls attack rate (gentle press = slow, hard press = fast) | |
# - notes have small random detune on all oscillators to reduce phase stacking | |
# - adjustable number of detuned oscillators per note 1-5 (midi controller 83) | |
# - five selectable waveforms: saw, squ, sin, noisy sin, noise (midi controller 82) | |
# - vibrato depth on mod wheel (midi controller 1) |