I did it differently for an audio recorder
I connected a LiIon charger (Adafruit Product Id 2124) to Teensy and cut the VUSB-Vin trace.
See Figure for connections. You may ignore the MEMS microphone.
similar but not as difficult to explain:
I had a wire connected to program button, and The teensy running on battery that could be put into program mode by switching on a soldering station. It seemed that the wire acted like an antenna and the...