Fix crash on devices without any paired Bluetooth devices.
If you have a Brainlink device and have installed the 1.06 or newer custom firmware via the Brainlink Firmware Uploader app, your Brainlink now has a two-channel sine/triangle/square/arbitrary wave generator that can go up to around 100-200kHz. This very simple wrapper app controls that generator.
Be careful not to exceed 20mA current draw on the Brainlink (so if you hook up to a 50ohm output, say, make sure you reduce amplitude to 1V or lower in accordance with Ohm's Law). There are no safety features in this app. It's designed for hobbyists who know what they are doing.
The Brainlink's DAC ports are unipolar. To get bipolar output from a port, stick a capacitor on it (0.1microfarad worked for me).
For instructions on how to use this, see:
instructables.com/id/Bluetooth-100kHz-two-channel-function-generator/
Source code at github.com/arpruss