After liberating a rotary encoder and weighted knob from an old USB sound board that no longer worked, I started soldering.
Edit: The code and Fritzing diagrams are available at https://github.com/rmd6502/BluetoothEncoder . Note that the Fritzing sketch shows a Trinket 5v, this is incorrect - it needs to be a Trinket 3.3v
Step 1: Wire It Up
This is pretty straightforward - just wire it up as shown in the attached image. Since I'd used a nonstandard rotary encoder, I had to solder it to another board to get the pin spacing right.