Skip to content

Instantly share code, notes, and snippets.

View RobCranfill's full-sized avatar

Rob Cranfill RobCranfill

View GitHub Profile
@todbot
todbot / synthio_portamento_hack.py
Last active January 16, 2025 08:48
a hacky way to do portamento in synthio in CircuitPython
# synthio_portamento_hack.py -- a hacky way to do portamento in synthio
#
import board, time, random
import audiobusio, audiomixer, synthio
import ulab.numpy as np
lck_pin, bck_pin, dat_pin = board.MISO, board.MOSI, board.SCK
audio = audiobusio.I2SOut(bit_clock=bck_pin, word_select=lck_pin, data=dat_pin)
mixer = audiomixer.Mixer(voice_count=1, sample_rate=28000, channel_count=1,
@samneggs
samneggs / bytecode.txt
Last active September 2, 2025 04:53
Robot War on Pi Pico 2 in MicroPython
================================================================================
ROBOT CODE DEBUG - 32-bit Opcode Format
================================================================================
Robot: ROBOT1
Active: True
--------------------------------------------------------------------------------
1: ; SAMPLE ROBOT 'SCANNER' ; (comment/empty)
2: ]START ; LABEL -> addr 0
3: ] DAMAGE TO D ; [ 0] MOV op1: 4 REG op2: 30 imm: 0
4: ]SCAN ; LABEL -> addr 1