An Arduino sketch that will automatically begin Bluetooth streaming playback in a fading fashion at startup on the SparkFun Purpletooth Jamboree.
- bc127: https://github.com/sparkfun/BC127_Breakout_Board
- QueueList: http://playground.arduino.cc/Code/QueueList
- SoftwareSerial: Included with Arduino IDE
The Purpletooth board sends a lot of AVRCP data over the serial port which provides metadata information about the currently playing track, i.e. song title, artist, etc. Because of this, the default buffer hardcoded in the SoftwareSerial library is usually insufficient and will result in buffer overflows that produce garbled strings. To fix this, bump up the _SS_MAX_RX_BUFF constant in SoftwareSerial.h to something greater than or equal to 256 (make sure your Arduino has enough memory for this). This is especially useful in case you want to display this metadata on a display.
This Arduino sketch will prevent new devices from being able to pair with the Purpletooth board. Therefore, disconnect the Arduino from the Purpletooth board, power it on, and use the PAIR button to add a new device. After initial pairing is complete reconnect the Arduino.