updated bluetooth docs

This commit is contained in:
Peli de Halleux
2016-06-22 09:25:01 -07:00
parent 34effcefc6
commit b150ee873f
7 changed files with 100 additions and 69 deletions

View File

@ -1,7 +1,12 @@
# Bluetooth Button Service
### ~hint
![](/static/bluetooth/Bluetooth_SIG.png)
For another device like a smartphone to use any of the Bluetooth "services" which the micro:bit has, it must first connect to the micro:bit.
### ~
The Bluetooth button service makes it possible for another device such as a smartphone to be notified wirelessly whenever a button on the front of a micro:bit is pressed. Each of the two micro:bit buttons can be in one of three possible states:
* Not pressed
@ -12,23 +17,21 @@ The button service allows you to make other things which are connected to your m
No additional code is needed on the micro:bit to use the Bluetooth button service from another device.
~~~~sig
```sig
bluetooth.startButtonService();
~~~~
```
### Example: Starting the Bluetooth button service
The following code shows the Bluetooth button service being started:
~~~~blocks
```blocks
bluetooth.startButtonService();
~~~~
```
### Video - Button service demo - Starts at 0:59
[![micro:bit Bluetooth demo video](/static/bluetooth/microbit_button.png)](
http://www.youtube.com/watch?v=aep_GVowKfs "Click to launch YouTube video"
)
http://www.youtube.com/watch?v=aep_GVowKfs
### Advanced
@ -36,7 +39,8 @@ For more advanced information on the micro:bit Bluetooth button service includin
### See also
[Bluetooth SIG](https://www.bluetooth.com)
[Bluetooth on micro:bit resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html)
[Bluetooth SIG](https://www.bluetooth.com),[Bluetooth on micro:bit resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html)
```package
microbit-bluetooth
```