Home - 1scale1/sweetbt GitHub Wiki
SweetBlue is the Processing:Android library used by 1scale1 when developing the prototyping tool Sweet (1scale1.com/sweet). The library is based on Google's Android example application, BluetoothChat, and extended with a defined protocol that allows for more advanced data communication between Android and ArduinoBT devices.
Below is a video showing the library in use by D. Sjunnesson inside his own UI framework, connected to a wearable demonstrator with several channels, of which two are LED's.
<iframe src="http://player.vimeo.com/video/20364462" width="400" height="225" frameborder="0"></iframe>SWEET Sliders from David Sjunnesson on Vimeo.
- Android powered device with Bluetooth capabilities
- ArduinoBT board
See platforms for more technical information about SweetBlue.
To install and use SweetBlue in your own Processing:Android sketches, follow the steps listed below. Make sure you've got Processing 1.5 and Arduino 0022 or newer.
- Take the Arduino Firmware from the repository and program your Arduino BT board with it
- There is three ways to program the Arduino BT: you can make it through the air (normal Arduino BT programming procedure using Bluetooth), you could use a USB-Serial converter connected to the RX-TX pins of the board (the programming speed has to be 115200), or you could get rid of Arduino's bootloader all together and use an ISCP over the SPI port on the Arduino board to burn the firmware
- Remember that you need the Bluetooth MAC address of your Arduino BT to be written in the Processing Sketch, a way to get it is while pairing your BT board with your computer before programming it
- Before you can program your Android device from Processing, it has to be configured to allow Debug mode (Settings --> Applications --> Development --> USB Debugging + USB Debugging Notify)
- Before your Arduino BT and Android phone can talk to each other, you need to pair them (Settings --> Wireless & network --> Bluetooth settings --> Scan for devices), remember that all the Arduino BT boards have the same password: 12345
- Download the latest SweetBlue package from Downloads. (Currently, the latest version is: sweetblue-0.1.4.zip)
- Extract the .zip file to your "ProcessingSketchbook/Libraries/" folder.
- Create a new sketch.
- In the "Sketch" menu, select "Add file..." and select the jar file within "ProcessingSketchbook/Libraries/SweetBlue/Library/" folder. This will copy the library file to your new Processing:Android sketch.
- A list of basic examples describing usage of the SweetBlue library.
- Some more advanced examples
- We have been using this library in a workshop with researchers from SICS (Swedish Institute of Computer Science) and MEDEA (Malmo University Research in Media and IoT). More information at the Sweet workshop page
In reference you can find a complete list of available commands.
TODO Link to page with list of known bugs