- Author: Martin Woolley
- Twitter: @bluetooth_mdw
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
This application contains a series of demonstrations which use the BBC micro:bit Bluetooth profile in various ways. It's purpose is both to act as a demo and to provide a source of example code which shows how to use the Bluetooth profile from Android.
Install the latest apk file from the releases folder. Note that the application requires at least version 2.0.0 of the micro:bit run time and the smartphone or tablet should be paired with the micro:bit before the application can be used.
The application should work on Android version 4.4 or later. Version 5 or later is recommended however. Limited testing has been carried out across Android versions however so please report any issues found.
- Needs a demo of analogue output
- Needs a demo of digital input
- Needs a demo of analogue input
- Sometimes the digital output demo is unable to determine the initial state of pin 0
- Animal Vegetable Mineral demo: If you disconnect from the micro:bit then reconnect you will not receive indication messages from the micro:bit any more. Reset the micro:bit and reconnect to solve this. Awaiting new micro:bit API to avoid the underlying issue.
- It's now possible to switch off data smoothing in the Accelerometer screen to see the effect it has
- Bug fix: out of range x/y coordinates sometimes broke touch processing in game controller.
- Bug fix: bug processing touch events in game controller caused rare crashes.
- Bug fix: application crashed when launched if Bluetooth was not already switched on
- Added further information to the main help screen
- Changed application name to micro:bit Blue
- Added the Trivia Scoreboard demo
- Swapped UART TX and RX UUIDs to be in line with Nordic Semiconductor official documentation. Note that this was correct with respect to earlier versions of the micro:bit runtime code. An underlying issue regarding the UART service, its characteristics and their properties has since been fixed and so the Animal Vegetable Mineral demo will only work with a hex file build from this later code base. The fix in question went into github master on 25th May 2016.
- Added Refresh Services menu item to the demo Menu Activity. GATT services (and characteristics and descriptors) discovered when connecting to a micro:bit are cached by Android. There's currently no way to tell Android that the GATT services 9etc) have changed because your micro:bit code has changed and so this menu item lets you manually initiate flushing of the cache and a full service (re)discovery process. If you get an error message saying a demo cannot be used because your micro:bit doesn't have a required Bluetooth service and you are 100% convinced it does have it, try using the Refresh Services menu option.
- Added UART service Animal Vegetable Mineral demo
- Tightened up closing of BluetoothGatt object on disconnect in the hope that this will improve realisbility on older Android versions
- Guarded execution of some operations in BleAdapterService according to the connection state
- moved wrapping of UI text messages originating from the BleAdapterService to the Activity that receives them
- Added simple interpretation of Magnetometer Bearing data, display the nearest point of the compass
- Included device Bluetooth address in scan results list to make it possible to distinguish between multiple paired micro:bits
- Removed redundant DualDPadControllerActivity.java
- Fixed game controller event code initialisation bug
- Fixed bug which resulted in attempts to pair with an unpaired micro:bit when the main settings screen had deselected filtering of unpaired devices i.e. we want to be able to work with unpaired micro:bits probably because we're developing and testing.
- Fixed bug in multi-touch handling in the dual d-pad game controller
- Display current heart rate instead of histogram every 10 seconds
- Added Heart Rate Histogram demo
- Improved D-Pad Controller screen with proper graphic
- Introduced vibration for feedback when using the D-Pad Controller
- Introduced multi-touch support for the D-Pad Controller
- Event Code and Event Values used by the D-Pad Controller are now configurable in a Settings screen.
- Tidied up layout of some screens to work better across Android device types
- Added Dual D-Pad Controller demo
- Added screen orientation properties for all activities
- Changed keep alive function to read the firmware revision string characteristic since the hardware revision string characteristic is being removed from the profile
- Removed hardware revision string from the device information screen
Added Bluetooth Services menu item to the menu page. Produces a report showing which Bluetooth services are present on or absent from the connected micro:bit 1.2.0
Modified to work with the "out of box" general release of the micro:bit runtime which uses Bluetooth security including pairing and white listing.
- Uses Android 5 scanning APIs if on 5.0 or later else uses old scanning APIs
- Initial version which used the Android 4.x scanning APIs
Pull Requests are not being accepted at this time. If you find a bug or have an idea for a new feature, please submit details in the issue tracker. In the case of new features, it may be possible to collaborate on the development. This will be assessed on a case by case basis.