rename micro:bit to @boardname@
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
|
||||
Bluetooth is a wireless communications technology which allows devices to communicate with each other without the need for a central device like a router or access point.
|
||||
|
||||
Bluetooth has a special "low energy feature" which means it can be used without requiring much power from the devices using it. It's the Bluetooth low energy feature which the micro:bit uses.
|
||||
Bluetooth has a special "low energy feature" which means it can be used without requiring much power from the devices using it. It's the Bluetooth low energy feature which the @boardname@ uses.
|
||||
|
||||
In the world of Bluetooth low energy, a device has something called a "profile" which defines the way other devices are able to communicate over Bluetooth with it. In a way, the Bluetooth profile defines the way a device appears to other devices in terms of its features and the things it can do.
|
||||
|
||||
@ -20,7 +20,7 @@ The Attribute Table contains something like a series of records of various types
|
||||
|
||||
### Attributes
|
||||
|
||||
Services, Characteristics and Descriptors are all types of Attribute. Hence Generic Attribute Profile, Attribute Table and something called the Attribute Protocol. All attributes have a type which is identified by a UUID (Universally Unique Identifer). Some Attributes are defined by the Bluetooth SIG, the technical standards body for Bluetooth and these have UUIDs which are 16 bits in length. Some Attributes are custom designed for a particular device by the product team and these have 128 bit UUIDs. The micro:bit uses a mixture of 16 bit and 128 bit UUIDs.
|
||||
Services, Characteristics and Descriptors are all types of Attribute. Hence Generic Attribute Profile, Attribute Table and something called the Attribute Protocol. All attributes have a type which is identified by a UUID (Universally Unique Identifer). Some Attributes are defined by the Bluetooth SIG, the technical standards body for Bluetooth and these have UUIDs which are 16 bits in length. Some Attributes are custom designed for a particular device by the product team and these have 128 bit UUIDs. The @boardname@ uses a mixture of 16 bit and 128 bit UUIDs.
|
||||
|
||||
### Structure
|
||||
|
||||
@ -30,7 +30,7 @@ Services, Characteristics and Descriptors are organised in a hierarchy with Serv
|
||||
|
||||
### Services
|
||||
|
||||
A Service is a container for logically related Bluetooth data items. Those data items are in fact called Characteristics. A Service can be thought of as the owner of the Characteristics inside it. Often a Service represents a particular feature (e.g. a hardware feature) of a device like the buttons or a particular sensor. An example of a Bluetooth SIG defined Service is the Device Information Service which, as the name suggests, is a container for various items of information about the device such as its manufacturer and serial number. The micro:bit has this service.
|
||||
A Service is a container for logically related Bluetooth data items. Those data items are in fact called Characteristics. A Service can be thought of as the owner of the Characteristics inside it. Often a Service represents a particular feature (e.g. a hardware feature) of a device like the buttons or a particular sensor. An example of a Bluetooth SIG defined Service is the Device Information Service which, as the name suggests, is a container for various items of information about the device such as its manufacturer and serial number. The @boardname@ has this service.
|
||||
|
||||
### Characteristics
|
||||
|
||||
@ -40,7 +40,7 @@ Characteristics contain various parts. They have a type, a value, some propertie
|
||||
|
||||
Type is something already explained above, a UUID value which indicates which particular type of Characteristic an Attribute is. Value is the value of the associated state data item.
|
||||
|
||||
Properties define what another device can do with the characteristic over Bluetooth in terms of various defined operations such as READ, WRITE or NOTIFY. Reading a characteristic means transferring its current value from the attribute table to the connected device over Bluetooth. Writing allows the connected device to change that value in the state table. Notifications are a special message type which a device like the micro:bit can send to a connected device whenever the value of the associated characteristic changes or perhaps periodically, controlled by a timer. Not all Characteristics support all operations. The Characteristic's properties tell you which operations are supported.
|
||||
Properties define what another device can do with the characteristic over Bluetooth in terms of various defined operations such as READ, WRITE or NOTIFY. Reading a characteristic means transferring its current value from the attribute table to the connected device over Bluetooth. Writing allows the connected device to change that value in the state table. Notifications are a special message type which a device like the @boardname@ can send to a connected device whenever the value of the associated characteristic changes or perhaps periodically, controlled by a timer. Not all Characteristics support all operations. The Characteristic's properties tell you which operations are supported.
|
||||
|
||||
Sometimes the device will have been programmed to respond in a special way when it processes an operation like reading or writing a value from the attribute table so operations can result in more happening than simply transferring data across the connection. Perhaps changing the value of a Characteristic will result in the device changing the frequency with which it samples readings from the device accelerometer for example.
|
||||
|
||||
@ -56,7 +56,7 @@ A Bluetooth profile is a specification which pulls together all the required inf
|
||||
|
||||
## Client Server Architecture
|
||||
|
||||
When a smartphone application interacts with a device like the micro:bit over a Bluetooth connection we have a client/server architecture. The phone application is usually the GATT client and the micro:bit is usually the GATT server. They communicate using a protocol called the Attribute Protocol or just ATT for short. As a smartphone developer you work with APIs and do not have to worry about formulating ATT protocol data units and so on.
|
||||
When a smartphone application interacts with a device like the @boardname@ over a Bluetooth connection we have a client/server architecture. The phone application is usually the GATT client and the @boardname@ is usually the GATT server. They communicate using a protocol called the Attribute Protocol or just ATT for short. As a smartphone developer you work with APIs and do not have to worry about formulating ATT protocol data units and so on.
|
||||
|
||||

|
||||
|
||||
@ -64,19 +64,19 @@ When a smartphone application interacts with a device like the micro:bit over a
|
||||
|
||||
Everything described above relates to devices which are connected and communicating as GATT client and server. But there's a stage which precedes this where the two devices are not yet connected. How do they find each other and connect? The answer to this question is termed 'Device Discovery' and is the responsibility of another part of the Bluetooth architecture called the Generic Access Profile (GAP).
|
||||
|
||||
In GAP, one devices advertises, emitting small packets of data periodically. These packets contain information about the device doing the advertising. Other devices looking for devices to connect to perform something called scanning, receiving and processing advertising packets and filtering out those that come from devices of a type that are not of interest. Usually the user is given information about devices which are discovered and they then select one to be connected to. The device which advertises is called a Bluetooth Peripheral whereas the one doing the scanning is a Bluetooth Central device. micro:bit is a Bluetooth peripheral.
|
||||
In GAP, one devices advertises, emitting small packets of data periodically. These packets contain information about the device doing the advertising. Other devices looking for devices to connect to perform something called scanning, receiving and processing advertising packets and filtering out those that come from devices of a type that are not of interest. Usually the user is given information about devices which are discovered and they then select one to be connected to. The device which advertises is called a Bluetooth Peripheral whereas the one doing the scanning is a Bluetooth Central device. @boardname@ is a Bluetooth peripheral.
|
||||
|
||||
Bluetooth on the @boardname@
|
||||
|
||||
Full documentation for the @boardname@ Bluetooth profile as used by this application can be found at the [Lancaster University documentation](http://lancaster-university.github.io/microbit-docs/ble/profile/) web site.
|
||||
|
||||
The micro:bit's accelerometer (motion detector), magnetometer (digital compass), two buttons on the front, LED Display, IO pins on the edge connector, internal message bus and internal temperature sensor are all exposed as Services so that applications can exploit these features of the device. In addition:
|
||||
The @boardname@'s accelerometer (motion detector), magnetometer (digital compass), two buttons on the front, LED Display, IO pins on the edge connector, internal message bus and internal temperature sensor are all exposed as Services so that applications can exploit these features of the device. In addition:
|
||||
|
||||
* the Bluetooth SIG defined Device Information Service is included to allow applications to obtain information such as firmware version details over Bluetooth
|
||||
* there's a Device Firmware Update (DFU) service which allows new micro:bit code to be flahsed to the device over Bluetooth instead of over USB
|
||||
* there's a UART service which allows arbitrary data to be exchanged with the micro:bit in a way resembling traditional serial communications.
|
||||
* there's a Device Firmware Update (DFU) service which allows new @boardname@ code to be flahsed to the device over Bluetooth instead of over USB
|
||||
* there's a UART service which allows arbitrary data to be exchanged with the @boardname@ in a way resembling traditional serial communications.
|
||||
|
||||
Everything you can do with the micro:bit over Bluetooth is achieved through read, write and notify operations. Not all characteristics support all three so check the profile documentation. Often there are Characteristics whose purpose is to allow you to write configuration values which control other behviours. Technically these are called Control Points. For example you can specify the frequency with which accelerometer data is sampled before it is transmitted as a Notification message to your application.
|
||||
Everything you can do with the @boardname@ over Bluetooth is achieved through read, write and notify operations. Not all characteristics support all three so check the profile documentation. Often there are Characteristics whose purpose is to allow you to write configuration values which control other behviours. Technically these are called Control Points. For example you can specify the frequency with which accelerometer data is sampled before it is transmitted as a Notification message to your application.
|
||||
|
||||
## Want to Know More?
|
||||
|
||||
@ -92,7 +92,7 @@ https://www.youtube.com/watch?v=aep_GVowKfs
|
||||
|
||||
### See also
|
||||
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [micro:bit Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [micro:bit Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on micro:bit resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [@boardname@ Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [@boardname@ Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on @boardname@ resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
|
||||
```package
|
||||
bluetooth
|
||||
|
@ -3,96 +3,96 @@
|
||||
### ~hint
|
||||

|
||||
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the micro:bit has, it must first be [paired with the micro:bit](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the micro:bit and exchange data relating to many of the micro:bit's features.
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the @boardname@ has, it must first be [paired with the @boardname@](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the @boardname@ and exchange data relating to many of the @boardname@'s features.
|
||||
|
||||
### ~
|
||||
|
||||
### What is 'pairing'?
|
||||
|
||||
'Pairing' is what you have to do to have your micro:bit trust another device like a smartphone and similarly, have your smartphone trust your micro:bit. Why 'trust'? Well, pairing is all about security. You wouldn't usually want just anyone's smartphone connecting to your micro:bit and making it do things so by pairing *your* smartphone with *your* micro:bit you ensure that only your devices can talk to each other.
|
||||
'Pairing' is what you have to do to have your @boardname@ trust another device like a smartphone and similarly, have your smartphone trust your @boardname@. Why 'trust'? Well, pairing is all about security. You wouldn't usually want just anyone's smartphone connecting to your @boardname@ and making it do things so by pairing *your* smartphone with *your* @boardname@ you ensure that only your devices can talk to each other.
|
||||
|
||||
Once you've paired your micro:bit with another device it also means that they are able to exchange information privately, without someone else being able to "see" the data they're exchanging over the air using Bluetooth. This is accomplished by data being [encrypted](https://en.wikipedia.org/wiki/Encryption) and pairing makes it possible for devices who trust each other to encrypt and decrypt data from each other.
|
||||
Once you've paired your @boardname@ with another device it also means that they are able to exchange information privately, without someone else being able to "see" the data they're exchanging over the air using Bluetooth. This is accomplished by data being [encrypted](https://en.wikipedia.org/wiki/Encryption) and pairing makes it possible for devices who trust each other to encrypt and decrypt data from each other.
|
||||
|
||||
# How do you pair your micro:bit with another device?
|
||||
# How do you pair your @boardname@ with another device?
|
||||
|
||||
Making your micro:bit pair requires you to follow some simple steps which will be described shortly. What you do with the device you're pairing it to will vary slightly depending on what that device is. We'll look at how it's done with common smartphones and tablets here too.
|
||||
Making your @boardname@ pair requires you to follow some simple steps which will be described shortly. What you do with the device you're pairing it to will vary slightly depending on what that device is. We'll look at how it's done with common smartphones and tablets here too.
|
||||
|
||||
To get your micro:bit ready for pairing do the following:
|
||||
To get your @boardname@ ready for pairing do the following:
|
||||
|
||||
1. Hold down buttons A and B on the front of your micro:bit together. The front is the side with two buttons and the LED display. Keep the two buttons held down. Don't let go of them yet!
|
||||
2. While still holding down buttons A and B, press and then release the reset button on the back of the micro:bit. Keep holding down buttons A and B.
|
||||
3. You should see "PAIRING MODE!" start to scroll across the micro:bit display. When you see this message start to appear you can release buttons A and B.
|
||||
4. Eventually you'll see a strange pattern on your micro:bit display. This is like your micro:bit's signature. Other people's micro:bits will probably display a different pattern.
|
||||
1. Hold down buttons A and B on the front of your @boardname@ together. The front is the side with two buttons and the LED display. Keep the two buttons held down. Don't let go of them yet!
|
||||
2. While still holding down buttons A and B, press and then release the reset button on the back of the @boardname@. Keep holding down buttons A and B.
|
||||
3. You should see "PAIRING MODE!" start to scroll across the @boardname@ display. When you see this message start to appear you can release buttons A and B.
|
||||
4. Eventually you'll see a strange pattern on your @boardname@ display. This is like your @boardname@'s signature. Other people's @boardname@s will probably display a different pattern.
|
||||
|
||||
Your micro:bit is now ready to be paired with the other device. Read the section below which relates to your 'other' device and watch the video too.
|
||||
Your @boardname@ is now ready to be paired with the other device. Read the section below which relates to your 'other' device and watch the video too.
|
||||
|
||||
### How do you pair your micro:bit with a Windows smartphone or tablet?
|
||||
### How do you pair your @boardname@ with a Windows smartphone or tablet?
|
||||
|
||||
1. Go into Settings
|
||||
2. Select Bluetooth
|
||||
3. Switch your micro:bit into 'pairing mode' using the steps above
|
||||
4. Wait until 'PAIRING MODE!' has finished scrolling across the micro:bit display. You should see your micro:bit listed on your Windows smartphone with a name something like '@boardname@ [zatig]'. Note that the 5 characters in brackets at the end will vary.
|
||||
5. On the Windows smartphone, tap the micro:bit named in the device list. This will initiate the pairing process.
|
||||
6. The micro:bit will display a left pointing arrow and the Windows smartphone will pop up a box into which you will be invited to enter a "pin" (Personal Identity Number).
|
||||
7. Press button A on the micro:bit and watch carefully as the micro:bit displays a sequence of 6 random numbers. You may find it easier to write them down than to remember them.
|
||||
8. Enter the 6 digits which the micro:bit displayed into your Windows smartphone in the pop-up box provided and then select "done".
|
||||
9. If you entered the right number the micro:bit will display a tick / check mark. If you made a mistake it will display a cross or X and you should repeat the process to try again.
|
||||
3. Switch your @boardname@ into 'pairing mode' using the steps above
|
||||
4. Wait until 'PAIRING MODE!' has finished scrolling across the @boardname@ display. You should see your @boardname@ listed on your Windows smartphone with a name something like '@boardname@ [zatig]'. Note that the 5 characters in brackets at the end will vary.
|
||||
5. On the Windows smartphone, tap the @boardname@ named in the device list. This will initiate the pairing process.
|
||||
6. The @boardname@ will display a left pointing arrow and the Windows smartphone will pop up a box into which you will be invited to enter a "pin" (Personal Identity Number).
|
||||
7. Press button A on the @boardname@ and watch carefully as the @boardname@ displays a sequence of 6 random numbers. You may find it easier to write them down than to remember them.
|
||||
8. Enter the 6 digits which the @boardname@ displayed into your Windows smartphone in the pop-up box provided and then select "done".
|
||||
9. If you entered the right number the @boardname@ will display a tick / check mark. If you made a mistake it will display a cross or X and you should repeat the process to try again.
|
||||
|
||||
#### Video
|
||||
https://www.youtube.com/watch?v=AoW3mit7jIg
|
||||
|
||||
|
||||
### How do you pair your micro:bit with an Android smartphone or tablet?
|
||||
### How do you pair your @boardname@ with an Android smartphone or tablet?
|
||||
|
||||
1. Go into Settings
|
||||
2. Select Bluetooth
|
||||
3. Switch your micro:bit into 'pairing mode' using the steps above
|
||||
4. Wait until 'PAIRING MODE!' has finished scrolling across the micro:bit display. You should see your micro:bit listed on your Android smartphone under the heading "Available devices" with a name something like '@boardname@ [zatig]'. Note that the 5 characters in brackets at the end will vary.
|
||||
5. On the Android smartphone, tap the micro:bit named in the Available devices list. This will initiate the pairing process.
|
||||
6. The micro:bit will display a left pointing arrow and the Android smartphone will pop up a box into which you will be invited to enter a "pin" (Personal Identity Number).
|
||||
7. Press button A on the micro:bit and watch carefully as the micro:bit displays a sequence of 6 random numbers. You may find it easier to write them down than to remember them.
|
||||
8. Enter the 6 digits which the micro:bit displayed into your Android smartphone in the pop-up box provided and then select "done".
|
||||
9. If you entered the right number the micro:bit will display a tick / check mark. If you made a mistake it will display a cross or X and you should repeat the process to try again.
|
||||
3. Switch your @boardname@ into 'pairing mode' using the steps above
|
||||
4. Wait until 'PAIRING MODE!' has finished scrolling across the @boardname@ display. You should see your @boardname@ listed on your Android smartphone under the heading "Available devices" with a name something like '@boardname@ [zatig]'. Note that the 5 characters in brackets at the end will vary.
|
||||
5. On the Android smartphone, tap the @boardname@ named in the Available devices list. This will initiate the pairing process.
|
||||
6. The @boardname@ will display a left pointing arrow and the Android smartphone will pop up a box into which you will be invited to enter a "pin" (Personal Identity Number).
|
||||
7. Press button A on the @boardname@ and watch carefully as the @boardname@ displays a sequence of 6 random numbers. You may find it easier to write them down than to remember them.
|
||||
8. Enter the 6 digits which the @boardname@ displayed into your Android smartphone in the pop-up box provided and then select "done".
|
||||
9. If you entered the right number the @boardname@ will display a tick / check mark. If you made a mistake it will display a cross or X and you should repeat the process to try again.
|
||||
|
||||
#### Video
|
||||
https://www.youtube.com/watch?v=7hLBfdAGkZI
|
||||
|
||||
### How do you pair your micro:bit with an Apple iOS smartphone or tablet?
|
||||
### How do you pair your @boardname@ with an Apple iOS smartphone or tablet?
|
||||
|
||||
The steps to pair with an Apple iOS device are different to those followed for an Android or Windows device. To trigger pairing you need an application which will try to interact with your micro:bit and it's that interaction that triggers the iOS pairing process. There are many you could use but for the purposes of this documentation we'll suggest you install the "nRF Master Control Panel" (nRF MCP) application from Nordic Semiconductor. You'll find it in the Apple app store. It's a really useful Bluetooth application which will help you learn about Bluetooth as well as it having the ability to trigger the pairing process. After installing nRF MCP you should follow these steps to pair with your micro:bit:
|
||||
The steps to pair with an Apple iOS device are different to those followed for an Android or Windows device. To trigger pairing you need an application which will try to interact with your @boardname@ and it's that interaction that triggers the iOS pairing process. There are many you could use but for the purposes of this documentation we'll suggest you install the "nRF Master Control Panel" (nRF MCP) application from Nordic Semiconductor. You'll find it in the Apple app store. It's a really useful Bluetooth application which will help you learn about Bluetooth as well as it having the ability to trigger the pairing process. After installing nRF MCP you should follow these steps to pair with your @boardname@:
|
||||
|
||||
1. Switch your micro:bit into 'pairing mode' using the steps above
|
||||
2. Wait until 'PAIRING MODE!' has finished scrolling across the micro:bit display.
|
||||
3. Launch the nRF MCP application. Your micro:bit should be listed and have a "Connect" button next to it.
|
||||
4. Select "Connect" to connect your Apple device to the micro:bit. This will trigger the pairing process.
|
||||
5. The micro:bit will display a left pointing arrow and the Apple device will pop up a box into which you will be invited to enter a "pin" (Personal Identity Number).
|
||||
6. Press button A on the micro:bit and watch carefully as the micro:bit displays a sequence of 6 random numbers. You may find it easier to write them down than to remember them.
|
||||
7. Enter the 6 digits which the micro:bit displayed into your Apple device in the pop-up box provided and then select "Pair".
|
||||
8. If you entered the right number the micro:bit will display a tick / check mark. If you made a mistake it will display a cross or X and you should repeat the process to try again.
|
||||
1. Switch your @boardname@ into 'pairing mode' using the steps above
|
||||
2. Wait until 'PAIRING MODE!' has finished scrolling across the @boardname@ display.
|
||||
3. Launch the nRF MCP application. Your @boardname@ should be listed and have a "Connect" button next to it.
|
||||
4. Select "Connect" to connect your Apple device to the @boardname@. This will trigger the pairing process.
|
||||
5. The @boardname@ will display a left pointing arrow and the Apple device will pop up a box into which you will be invited to enter a "pin" (Personal Identity Number).
|
||||
6. Press button A on the @boardname@ and watch carefully as the @boardname@ displays a sequence of 6 random numbers. You may find it easier to write them down than to remember them.
|
||||
7. Enter the 6 digits which the @boardname@ displayed into your Apple device in the pop-up box provided and then select "Pair".
|
||||
8. If you entered the right number the @boardname@ will display a tick / check mark. If you made a mistake it will display a cross or X and you should repeat the process to try again.
|
||||
|
||||
#### Video
|
||||
https://www.youtube.com/watch?v=wslwyAMwMhs
|
||||
|
||||
|
||||
### How often do I need to pair my micro:bit with my phone?
|
||||
### How often do I need to pair my @boardname@ with my phone?
|
||||
|
||||
You do *not* need to pair your micro:bit and smartphone or tablet every time you use them together. Pairing establishes 'trust' which will be retained until it is somehow lost. When another device wants to talk to your micro:bit it must connect to it but connecting and pairing are not the same thing.
|
||||
You do *not* need to pair your @boardname@ and smartphone or tablet every time you use them together. Pairing establishes 'trust' which will be retained until it is somehow lost. When another device wants to talk to your @boardname@ it must connect to it but connecting and pairing are not the same thing.
|
||||
|
||||
There are circumstances which will result in pairing data being lost however and when this happens you will need to pair again.
|
||||
|
||||
Currently, flashing new code via a USB cable causes the micro:bit's Bluetooth pairing data to be lost. Consequently, if you do flash new code to your micro:bit using a USB cable you will need to pair again.
|
||||
Currently, flashing new code via a USB cable causes the @boardname@'s Bluetooth pairing data to be lost. Consequently, if you do flash new code to your @boardname@ using a USB cable you will need to pair again.
|
||||
|
||||
In contrast if you upload new code to your micro:bit over Bluetooth, using for example the Samsung micro:bit application for Android devices, you will not need to pair again.
|
||||
In contrast if you upload new code to your @boardname@ over Bluetooth, using for example the Samsung @boardname@ application for Android devices, you will not need to pair again.
|
||||
|
||||
If you do find yourself needing to pair again you will first need to remove the pairing from your other device (i.e. smartphone or tablet):
|
||||
|
||||
* On Android go into Settings/Bluetooth, select the 'cog' next to your micro:bit and then select FORGET
|
||||
* On iOS go into Settings/Bluetooth, select your micro:bit and then select Forget This Device
|
||||
* On a Windows device go into Settings/Bluetooth. Press and hold the micro:bit entry on the Windows device. A pop-up will appear with the option "delete". Select "delete" to unpair your micro:bit.
|
||||
* On Android go into Settings/Bluetooth, select the 'cog' next to your @boardname@ and then select FORGET
|
||||
* On iOS go into Settings/Bluetooth, select your @boardname@ and then select Forget This Device
|
||||
* On a Windows device go into Settings/Bluetooth. Press and hold the @boardname@ entry on the Windows device. A pop-up will appear with the option "delete". Select "delete" to unpair your @boardname@.
|
||||
|
||||
### See also
|
||||
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [micro:bit Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [micro:bit Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on micro:bit resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [@boardname@ Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [@boardname@ Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on @boardname@ resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
|
||||
|
||||
```package
|
||||
|
@ -3,12 +3,12 @@
|
||||
### ~hint
|
||||

|
||||
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the micro:bit has, it must first be [paired with the micro:bit](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the micro:bit and exchange data relating to many of the micro:bit's features.
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the @boardname@ has, it must first be [paired with the @boardname@](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the @boardname@ and exchange data relating to many of the @boardname@'s features.
|
||||
|
||||
### ~
|
||||
|
||||
This block starts an [event handler](/reference/event-handler) which in this case will run
|
||||
when something connects to your micro:bit using Bluetooth.
|
||||
when something connects to your @boardname@ using Bluetooth.
|
||||
|
||||
```sig
|
||||
bluetooth.onBluetoothConnected(() => {});
|
||||
@ -16,7 +16,7 @@ bluetooth.onBluetoothConnected(() => {});
|
||||
|
||||
### Example
|
||||
|
||||
You could use this event handler to display a letter "C" on the micro:bit LED grid so you know you have a Bluetooth connection. Or you might want to send some data you've been accumulating to your smartphone as soon as it connects to your micro:bit. Maybe you've been using the accelerometer in your micro:bit to count your steps for example. Using this event handler you could send the accumulated step count to your phone when it establishes a Bluetooth connection.
|
||||
You could use this event handler to display a letter "C" on the @boardname@ LED grid so you know you have a Bluetooth connection. Or you might want to send some data you've been accumulating to your smartphone as soon as it connects to your @boardname@. Maybe you've been using the accelerometer in your @boardname@ to count your steps for example. Using this event handler you could send the accumulated step count to your phone when it establishes a Bluetooth connection.
|
||||
|
||||
```blocks
|
||||
bluetooth.onBluetoothConnected(() => {
|
||||
@ -30,7 +30,7 @@ http://www.youtube.com/watch?v=HyBcsD9Eh6I
|
||||
|
||||
### See also
|
||||
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [micro:bit Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [micro:bit Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on micro:bit resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [@boardname@ Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [@boardname@ Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on @boardname@ resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
|
||||
```package
|
||||
bluetooth
|
||||
|
@ -3,20 +3,20 @@
|
||||
### ~hint
|
||||

|
||||
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the micro:bit has, it must first be [paired with the micro:bit](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the micro:bit and exchange data relating to many of the micro:bit's features.
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the @boardname@ has, it must first be [paired with the @boardname@](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the @boardname@ and exchange data relating to many of the @boardname@'s features.
|
||||
|
||||
### ~
|
||||
|
||||
This block starts an [event handler](/reference/event-handler) which in this case will run when a device which is connected to your micro:bit over Bluetooth disconnects.
|
||||
This block starts an [event handler](/reference/event-handler) which in this case will run when a device which is connected to your @boardname@ over Bluetooth disconnects.
|
||||
|
||||
You could use this event handler to display a letter "D" on the micro:bit LED grid so you know that the Bluetooth connection has been closed.
|
||||
You could use this event handler to display a letter "D" on the @boardname@ LED grid so you know that the Bluetooth connection has been closed.
|
||||
|
||||
```sig
|
||||
bluetooth.onBluetoothDisconnected(() => {
|
||||
});
|
||||
```
|
||||
|
||||
### Example: Displaying "D" when a Bluetooth connection to the micro:bit is closed
|
||||
### Example: Displaying "D" when a Bluetooth connection to the @boardname@ is closed
|
||||
|
||||
```blocks
|
||||
bluetooth.onBluetoothDisconnected(() => {
|
||||
@ -30,7 +30,7 @@ http://www.youtube.com/watch?v=HyBcsD9Eh6I
|
||||
|
||||
### See also
|
||||
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [micro:bit Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [micro:bit Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on micro:bit resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [@boardname@ Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [@boardname@ Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on @boardname@ resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
|
||||
```package
|
||||
bluetooth
|
||||
|
@ -3,15 +3,15 @@
|
||||
### ~hint
|
||||

|
||||
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the micro:bit has, it must first be [paired with the micro:bit](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the micro:bit and exchange data relating to many of the micro:bit's features.
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the @boardname@ has, it must first be [paired with the @boardname@](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the @boardname@ and exchange data relating to many of the @boardname@'s features.
|
||||
|
||||
### ~
|
||||
|
||||
The Bluetooth accelerometer service allows another device such as a smartphone to wirelessly receive data from the micro:bit's accelerometer. An accelerometer detects motion. More precisely, it measures acceleration in one or more of three directions which we call X, Y and Z.
|
||||
The Bluetooth accelerometer service allows another device such as a smartphone to wirelessly receive data from the @boardname@'s accelerometer. An accelerometer detects motion. More precisely, it measures acceleration in one or more of three directions which we call X, Y and Z.
|
||||
|
||||
Using the Bluetooth accelerometer service you could, for example, create a smartphone application which makes a loud noise whenever your micro:bit (or the important thing you've attached it to) is moved. Or you could use your micro:bit to control the movement of a cartoon character in a game on your smartphone just by tilting the micro:bit in the direction you want the character to move in.
|
||||
Using the Bluetooth accelerometer service you could, for example, create a smartphone application which makes a loud noise whenever your @boardname@ (or the important thing you've attached it to) is moved. Or you could use your @boardname@ to control the movement of a cartoon character in a game on your smartphone just by tilting the @boardname@ in the direction you want the character to move in.
|
||||
|
||||
No additional code is needed on the micro:bit to use the Bluetooth accelerometer service from another device.
|
||||
No additional code is needed on the @boardname@ to use the Bluetooth accelerometer service from another device.
|
||||
|
||||
```sig
|
||||
bluetooth.startAccelerometerService();
|
||||
@ -31,11 +31,11 @@ http://www.youtube.com/watch?v=aep_GVowKfs#t=18s
|
||||
|
||||
### Advanced
|
||||
|
||||
For more advanced information on the micro:bit Bluetooth accelerometer service including information on using a smartphone, see the [Lancaster University micro:bit runtime technical documentation](http://lancaster-university.github.io/microbit-docs/ble/accelerometer-service/)
|
||||
For more advanced information on the @boardname@ Bluetooth accelerometer service including information on using a smartphone, see the [Lancaster University @boardname@ runtime technical documentation](http://lancaster-university.github.io/microbit-docs/ble/accelerometer-service/)
|
||||
|
||||
### See also
|
||||
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [micro:bit Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [micro:bit Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on micro:bit resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [@boardname@ Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [@boardname@ Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on @boardname@ resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
|
||||
```package
|
||||
bluetooth
|
||||
|
@ -3,19 +3,19 @@
|
||||
### ~hint
|
||||

|
||||
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the micro:bit has, it must first be [paired with the micro:bit](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the micro:bit and exchange data relating to many of the micro:bit's features.
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the @boardname@ has, it must first be [paired with the @boardname@](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the @boardname@ and exchange data relating to many of the @boardname@'s features.
|
||||
|
||||
### ~
|
||||
|
||||
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:
|
||||
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 @boardname@ is pressed. Each of the two @boardname@ buttons can be in one of three possible states:
|
||||
|
||||
* Not pressed
|
||||
* Pressed
|
||||
* Long press - pressed and held down for at least 2 seconds
|
||||
|
||||
The button service allows you to make other things which are connected to your micro:bit using Bluetooth respond in some way when you press either of the buttons. You could, for example, hide your smartphone somewhere in the room and have it make an amusing noise when you press either of the buttons on your micro:bit. We'll leave it to you to decide what would be amusing.
|
||||
The button service allows you to make other things which are connected to your @boardname@ using Bluetooth respond in some way when you press either of the buttons. You could, for example, hide your smartphone somewhere in the room and have it make an amusing noise when you press either of the buttons on your @boardname@. We'll leave it to you to decide what would be amusing.
|
||||
|
||||
No additional code is needed on the micro:bit to use the Bluetooth button service from another device.
|
||||
No additional code is needed on the @boardname@ to use the Bluetooth button service from another device.
|
||||
|
||||
```sig
|
||||
bluetooth.startButtonService();
|
||||
@ -35,11 +35,11 @@ http://www.youtube.com/watch?v=aep_GVowKfs
|
||||
|
||||
### Advanced
|
||||
|
||||
For more advanced information on the micro:bit Bluetooth button service including information on using a smartphone, see the [Lancaster University micro:bit runtime technical documentation](http://lancaster-university.github.io/microbit-docs/ble/button-service/)
|
||||
For more advanced information on the @boardname@ Bluetooth button service including information on using a smartphone, see the [Lancaster University @boardname@ runtime technical documentation](http://lancaster-university.github.io/microbit-docs/ble/button-service/)
|
||||
|
||||
### See also
|
||||
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [micro:bit Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [micro:bit Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on micro:bit resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [@boardname@ Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [@boardname@ Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on @boardname@ resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
|
||||
```package
|
||||
bluetooth
|
||||
|
@ -3,13 +3,13 @@
|
||||
### ~hint
|
||||

|
||||
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the micro:bit has, it must first be [paired with the micro:bit](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the micro:bit and exchange data relating to many of the micro:bit's features.
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the @boardname@ has, it must first be [paired with the @boardname@](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the @boardname@ and exchange data relating to many of the @boardname@'s features.
|
||||
|
||||
### ~
|
||||
|
||||
The Bluetooth IO pin service makes it possible for another device such as a smartphone to communicate with other electronic 'things' connected to a micro:bit's edge connector. You could for example, use your smartphone to switch on or off a light which is connected to the micro:bit or your smartphone could receive data collected from a sensor connected to the micro:bit. In fact you could do both of these things at the same time since the Bluetooth IO pin service lets you interact with multiple 'pins' on the edge conector in different ways all at the same time.
|
||||
The Bluetooth IO pin service makes it possible for another device such as a smartphone to communicate with other electronic 'things' connected to a @boardname@'s edge connector. You could for example, use your smartphone to switch on or off a light which is connected to the @boardname@ or your smartphone could receive data collected from a sensor connected to the @boardname@. In fact you could do both of these things at the same time since the Bluetooth IO pin service lets you interact with multiple 'pins' on the edge conector in different ways all at the same time.
|
||||
|
||||
No additional code is needed on the micro:bit to use the Bluetooth IO pin service from another device.
|
||||
No additional code is needed on the @boardname@ to use the Bluetooth IO pin service from another device.
|
||||
|
||||
```sig
|
||||
bluetooth.startIOPinService();
|
||||
@ -29,11 +29,11 @@ http://www.youtube.com/watch?v=aep_GVowKfs
|
||||
|
||||
### Advanced
|
||||
|
||||
For more advanced information on the micro:bit Bluetooth IO pin service including information on using a smartphone, see the [Lancaster University micro:bit runtime technical documentation](http://lancaster-university.github.io/microbit-docs/ble/iopin-service/)
|
||||
For more advanced information on the @boardname@ Bluetooth IO pin service including information on using a smartphone, see the [Lancaster University @boardname@ runtime technical documentation](http://lancaster-university.github.io/microbit-docs/ble/iopin-service/)
|
||||
|
||||
### See also
|
||||
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [micro:bit Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [micro:bit Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on micro:bit resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [@boardname@ Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [@boardname@ Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on @boardname@ resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
|
||||
```package
|
||||
bluetooth
|
||||
|
@ -3,15 +3,15 @@
|
||||
### ~hint
|
||||

|
||||
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the micro:bit has, it must first be [paired with the micro:bit](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the micro:bit and exchange data relating to many of the micro:bit's features.
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the @boardname@ has, it must first be [paired with the @boardname@](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the @boardname@ and exchange data relating to many of the @boardname@'s features.
|
||||
|
||||
### ~
|
||||
|
||||
The Bluetooth LED service allows another device such as a smartphone to send short text strings or patterns over a Bluetooth connection to a micro:bit for display on its LED matrix. Text will scroll across the micro:bit and the speed at which it scrolls can also be controlled using the Bluetooth LED service. Devices using the LED service may also read the current state of the micro:bit's LED matrix.
|
||||
The Bluetooth LED service allows another device such as a smartphone to send short text strings or patterns over a Bluetooth connection to a @boardname@ for display on its LED matrix. Text will scroll across the @boardname@ and the speed at which it scrolls can also be controlled using the Bluetooth LED service. Devices using the LED service may also read the current state of the @boardname@'s LED matrix.
|
||||
|
||||
So you could, for example, draw a smiley face in a smartphone app and at the press of a button, have it magically appear on your micro:bit on the other side of the room. Or you could program your smartphone to send a message to your micro:bit whenever your phone receives an email, SMS or social media message so you could wear your micro:bit like a smart watch and leave your phone in your bag.
|
||||
So you could, for example, draw a smiley face in a smartphone app and at the press of a button, have it magically appear on your @boardname@ on the other side of the room. Or you could program your smartphone to send a message to your @boardname@ whenever your phone receives an email, SMS or social media message so you could wear your @boardname@ like a smart watch and leave your phone in your bag.
|
||||
|
||||
No additional code is needed on the micro:bit to use the Bluetooth LED service from another device.
|
||||
No additional code is needed on the @boardname@ to use the Bluetooth LED service from another device.
|
||||
|
||||
```sig
|
||||
bluetooth.startLEDService();
|
||||
@ -31,11 +31,11 @@ http://www.youtube.com/watch?v=aep_GVowKfs
|
||||
|
||||
### Advanced
|
||||
|
||||
For more advanced information on the micro:bit Bluetooth LED service including information on using a smartphone, see the [Lancaster University micro:bit runtime technical documentation](http://lancaster-university.github.io/microbit-docs/ble/led-service/)
|
||||
For more advanced information on the @boardname@ Bluetooth LED service including information on using a smartphone, see the [Lancaster University @boardname@ runtime technical documentation](http://lancaster-university.github.io/microbit-docs/ble/led-service/)
|
||||
|
||||
### See also
|
||||
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [micro:bit Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [micro:bit Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on micro:bit resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [@boardname@ Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [@boardname@ Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on @boardname@ resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
|
||||
```package
|
||||
bluetooth
|
||||
|
@ -3,15 +3,15 @@
|
||||
### ~hint
|
||||

|
||||
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the micro:bit has, it must first be [paired with the micro:bit](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the micro:bit and exchange data relating to many of the micro:bit's features.
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the @boardname@ has, it must first be [paired with the @boardname@](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the @boardname@ and exchange data relating to many of the @boardname@'s features.
|
||||
|
||||
### ~
|
||||
|
||||
The Bluetooth magnetometer service allows another device such as a smartphone to wirelessly receive data from the micro:bit's magnetometer. The magnetometer measures the strength and direction of magnetic fields including the earth's and so it can be used as a digital compass and indicate the way the micro:bit is pointing relative to magnetic north.
|
||||
The Bluetooth magnetometer service allows another device such as a smartphone to wirelessly receive data from the @boardname@'s magnetometer. The magnetometer measures the strength and direction of magnetic fields including the earth's and so it can be used as a digital compass and indicate the way the @boardname@ is pointing relative to magnetic north.
|
||||
|
||||
Using the Bluetooth magnetometer service you could, for example, create a smartphone application which displays your direction of travel, updating it in real time.
|
||||
|
||||
No additional code is needed on the micro:bit to use the Bluetooth magnetometer service from another device.
|
||||
No additional code is needed on the @boardname@ to use the Bluetooth magnetometer service from another device.
|
||||
|
||||
```sig
|
||||
bluetooth.startMagnetometerService();
|
||||
@ -31,11 +31,11 @@ http://www.youtube.com/watch?v=C_0VL4Gp4_U
|
||||
|
||||
### Advanced
|
||||
|
||||
For more advanced information on the micro:bit Bluetooth magnetometer service including information on using a smartphone, see the [Lancaster University micro:bit runtime technical documentation](http://lancaster-university.github.io/microbit-docs/ble/magnetometer-service/)
|
||||
For more advanced information on the @boardname@ Bluetooth magnetometer service including information on using a smartphone, see the [Lancaster University @boardname@ runtime technical documentation](http://lancaster-university.github.io/microbit-docs/ble/magnetometer-service/)
|
||||
|
||||
### See also
|
||||
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [micro:bit Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [micro:bit Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on micro:bit resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [@boardname@ Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [@boardname@ Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on @boardname@ resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
|
||||
|
||||
```package
|
||||
|
@ -3,15 +3,15 @@
|
||||
### ~hint
|
||||

|
||||
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the micro:bit has, it must first be [paired with the micro:bit](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the micro:bit and exchange data relating to many of the micro:bit's features.
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the @boardname@ has, it must first be [paired with the @boardname@](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the @boardname@ and exchange data relating to many of the @boardname@'s features.
|
||||
|
||||
### ~
|
||||
|
||||
A micro:bit is able to provide a rough measure of the current environmental temperature. It's an approximation only as in fact the temperature value is inferred from the temperature of its main processor. The Bluetooth temperature service allows another device such as a smartphone to wirelessly find out the micro:bit's current temperature reading or to receive a constant stream of temperature data values. Temperature values are expressed in degrees celsius.
|
||||
A @boardname@ is able to provide a rough measure of the current environmental temperature. It's an approximation only as in fact the temperature value is inferred from the temperature of its main processor. The Bluetooth temperature service allows another device such as a smartphone to wirelessly find out the @boardname@'s current temperature reading or to receive a constant stream of temperature data values. Temperature values are expressed in degrees celsius.
|
||||
|
||||
Using the Bluetooth temperature service you could turn your smartphone or tablet into a graphical thermometer using your micro:bit as the sensor.
|
||||
Using the Bluetooth temperature service you could turn your smartphone or tablet into a graphical thermometer using your @boardname@ as the sensor.
|
||||
|
||||
No additional code is needed on the micro:bit to use the Bluetooth temperature service from another device.
|
||||
No additional code is needed on the @boardname@ to use the Bluetooth temperature service from another device.
|
||||
|
||||
```sig
|
||||
bluetooth.startTemperatureService();
|
||||
@ -31,11 +31,11 @@ http://www.youtube.com/watch?v=aep_GVowKfs
|
||||
|
||||
### Advanced
|
||||
|
||||
For more advanced information on the micro:bit Bluetooth temperature service including information on using a smartphone, see the [Lancaster University micro:bit runtime technical documentation](http://lancaster-university.github.io/microbit-docs/ble/temperature-service/)
|
||||
For more advanced information on the @boardname@ Bluetooth temperature service including information on using a smartphone, see the [Lancaster University @boardname@ runtime technical documentation](http://lancaster-university.github.io/microbit-docs/ble/temperature-service/)
|
||||
|
||||
### See also
|
||||
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [micro:bit Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [micro:bit Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on micro:bit resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [@boardname@ Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [@boardname@ Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on @boardname@ resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
|
||||
|
||||
```package
|
||||
|
@ -3,17 +3,17 @@
|
||||
### ~hint
|
||||

|
||||
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the micro:bit has, it must first be [paired with the micro:bit](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the micro:bit and exchange data relating to many of the micro:bit's features.
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the @boardname@ has, it must first be [paired with the @boardname@](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the @boardname@ and exchange data relating to many of the @boardname@'s features.
|
||||
|
||||
### ~
|
||||
|
||||
The Bluetooth UART service allows another device such as a smartphone to exchange any data it wants to with the micro:bit, in small chunks which are intended to be joined together. [UART[(https://en.wikipedia.org/wiki/Universal_asynchronous_receiver/transmitter) stands for Universal Asynchronous Receiver Transmitter and is one way in which serial data communications can be performed, usually between two devices connected by a physical, wired connection. The Bluetooth UART service emulates the behaviour of a physical UART system and allows the exchange of a maximum of 20 bytes of data at a time in either direction.
|
||||
The Bluetooth UART service allows another device such as a smartphone to exchange any data it wants to with the @boardname@, in small chunks which are intended to be joined together. [UART[(https://en.wikipedia.org/wiki/Universal_asynchronous_receiver/transmitter) stands for Universal Asynchronous Receiver Transmitter and is one way in which serial data communications can be performed, usually between two devices connected by a physical, wired connection. The Bluetooth UART service emulates the behaviour of a physical UART system and allows the exchange of a maximum of 20 bytes of data at a time in either direction.
|
||||
|
||||
When this service is used, the micro:bit sets up a 60 byte buffer and data it receives will be accumulated in the buffer until it is full. When using the UART service from your micro:bit code, you can indicate a special character which will be used to mean that the entire message in at most three chunks has now been sent by the other, connected device, at which point the micro:bit will release the entire contents of its buffer to any code trying to read it. In other words this special character, known as a 'delimiter' is used by the device connected to the micro:bit to mean "I've sent my whole message, you can now use it".
|
||||
When this service is used, the @boardname@ sets up a 60 byte buffer and data it receives will be accumulated in the buffer until it is full. When using the UART service from your @boardname@ code, you can indicate a special character which will be used to mean that the entire message in at most three chunks has now been sent by the other, connected device, at which point the @boardname@ will release the entire contents of its buffer to any code trying to read it. In other words this special character, known as a 'delimiter' is used by the device connected to the @boardname@ to mean "I've sent my whole message, you can now use it".
|
||||
|
||||
You could use the UART service for many things. It doesn't care what you put in messages which makes it very flexible. You could create a guessing game, with questions and answers passing between micro:bit and a smartphone or you could connect a camera to the micro:bit and transmit image data obtained from the edge connector, in chunks over Bluetooth to a smartphone. There are a great many possibilities.
|
||||
You could use the UART service for many things. It doesn't care what you put in messages which makes it very flexible. You could create a guessing game, with questions and answers passing between @boardname@ and a smartphone or you could connect a camera to the @boardname@ and transmit image data obtained from the edge connector, in chunks over Bluetooth to a smartphone. There are a great many possibilities.
|
||||
|
||||
To use the Bluetooth UART service from another device you'll need additional micro:bit code which reads and uses data from the UART buffer and / or writes data to the buffer for transmission over Bluetooth to another device.
|
||||
To use the Bluetooth UART service from another device you'll need additional @boardname@ code which reads and uses data from the UART buffer and / or writes data to the buffer for transmission over Bluetooth to another device.
|
||||
|
||||
```sig
|
||||
bluetooth.startUartService();
|
||||
@ -33,11 +33,11 @@ https://www.youtube.com/watch?v=PgGeWddMAZ0
|
||||
|
||||
### Advanced
|
||||
|
||||
For more advanced information on the micro:bit Bluetooth UART service including information on using a smartphone, see the [Lancaster University micro:bit runtime technical documentation](http://lancaster-university.github.io/microbit-docs/ble/uart-service/)
|
||||
For more advanced information on the @boardname@ Bluetooth UART service including information on using a smartphone, see the [Lancaster University @boardname@ runtime technical documentation](http://lancaster-university.github.io/microbit-docs/ble/uart-service/)
|
||||
|
||||
### See also
|
||||
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [micro:bit Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [micro:bit Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on micro:bit resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [@boardname@ Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [@boardname@ Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on @boardname@ resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
|
||||
```package
|
||||
bluetooth
|
||||
|
@ -3,13 +3,13 @@
|
||||
### ~hint
|
||||

|
||||
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the micro:bit has, it must first be [paired with the micro:bit](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the micro:bit and exchange data relating to many of the micro:bit's features.
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the @boardname@ has, it must first be [paired with the @boardname@](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the @boardname@ and exchange data relating to many of the @boardname@'s features.
|
||||
|
||||
### ~
|
||||
|
||||
The [Bluetooth UART service](/reference/bluetooth/start-uart-service) allows another device such as a smartphone to exchange any data it wants to with the micro:bit, in small chunks.
|
||||
The [Bluetooth UART service](/reference/bluetooth/start-uart-service) allows another device such as a smartphone to exchange any data it wants to with the @boardname@, in small chunks.
|
||||
|
||||
With the Bluetooth UART service running, this block allows a micro:bit to read data which has been received from a Bluetooth connected device, terminating reading and returning the value obtained as soon as a specified delimiter character is encountered. This means that connected devices can send data to the micro:bit and indicate that the complete message has been sent by appending the message with the delimiter character.
|
||||
With the Bluetooth UART service running, this block allows a @boardname@ to read data which has been received from a Bluetooth connected device, terminating reading and returning the value obtained as soon as a specified delimiter character is encountered. This means that connected devices can send data to the @boardname@ and indicate that the complete message has been sent by appending the message with the delimiter character.
|
||||
|
||||
```sig
|
||||
bluetooth.uartReadUntil("");
|
||||
@ -41,11 +41,11 @@ https://www.youtube.com/watch?v=PgGeWddMAZ0
|
||||
|
||||
### Advanced
|
||||
|
||||
For more advanced information on the micro:bit Bluetooth UART service including information on using a smartphone, see the [Lancaster University micro:bit runtime technical documentation](http://lancaster-university.github.io/microbit-docs/ble/uart-service/)
|
||||
For more advanced information on the @boardname@ Bluetooth UART service including information on using a smartphone, see the [Lancaster University @boardname@ runtime technical documentation](http://lancaster-university.github.io/microbit-docs/ble/uart-service/)
|
||||
|
||||
### See also
|
||||
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [micro:bit Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [micro:bit Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on micro:bit resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [@boardname@ Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [@boardname@ Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on @boardname@ resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
|
||||
```package
|
||||
bluetooth
|
||||
|
@ -3,13 +3,13 @@
|
||||
### ~hint
|
||||

|
||||
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the micro:bit has, it must first be [paired with the micro:bit](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the micro:bit and exchange data relating to many of the micro:bit's features.
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the @boardname@ has, it must first be [paired with the @boardname@](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the @boardname@ and exchange data relating to many of the @boardname@'s features.
|
||||
|
||||
### ~
|
||||
|
||||
The [Bluetooth UART service](/reference/bluetooth/start-uart-service) allows another device such as a smartphone to exchange any data it wants to with the micro:bit, in small chunks.
|
||||
The [Bluetooth UART service](/reference/bluetooth/start-uart-service) allows another device such as a smartphone to exchange any data it wants to with the @boardname@, in small chunks.
|
||||
|
||||
With the Bluetooth UART service running, this block allows a micro:bit to send data to a Bluetooth connected device.
|
||||
With the Bluetooth UART service running, this block allows a @boardname@ to send data to a Bluetooth connected device.
|
||||
|
||||
```sig
|
||||
bluetooth.uartWriteNumber(42);
|
||||
@ -17,11 +17,11 @@ bluetooth.uartWriteNumber(42);
|
||||
|
||||
### Advanced
|
||||
|
||||
For more advanced information on the micro:bit Bluetooth UART service including information on using a smartphone, see the [Lancaster University micro:bit runtime technical documentation](http://lancaster-university.github.io/microbit-docs/ble/uart-service/)
|
||||
For more advanced information on the @boardname@ Bluetooth UART service including information on using a smartphone, see the [Lancaster University @boardname@ runtime technical documentation](http://lancaster-university.github.io/microbit-docs/ble/uart-service/)
|
||||
|
||||
### See also
|
||||
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [micro:bit Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [micro:bit Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on micro:bit resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [@boardname@ Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [@boardname@ Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on @boardname@ resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
|
||||
```package
|
||||
bluetooth
|
||||
|
@ -3,13 +3,13 @@
|
||||
### ~hint
|
||||

|
||||
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the micro:bit has, it must first be [paired with the micro:bit](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the micro:bit and exchange data relating to many of the micro:bit's features.
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the @boardname@ has, it must first be [paired with the @boardname@](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the @boardname@ and exchange data relating to many of the @boardname@'s features.
|
||||
|
||||
### ~
|
||||
|
||||
The [Bluetooth UART service](/reference/bluetooth/start-uart-service) allows another device such as a smartphone to exchange any data it wants to with the micro:bit, in small chunks.
|
||||
The [Bluetooth UART service](/reference/bluetooth/start-uart-service) allows another device such as a smartphone to exchange any data it wants to with the @boardname@, in small chunks.
|
||||
|
||||
With the Bluetooth UART service running, this block allows a micro:bit to send data to a Bluetooth connected device.
|
||||
With the Bluetooth UART service running, this block allows a @boardname@ to send data to a Bluetooth connected device.
|
||||
|
||||
```sig
|
||||
bluetooth.uartWriteString("");
|
||||
@ -40,11 +40,11 @@ https://www.youtube.com/watch?v=PgGeWddMAZ0
|
||||
|
||||
### Advanced
|
||||
|
||||
For more advanced information on the micro:bit Bluetooth UART service including information on using a smartphone, see the [Lancaster University micro:bit runtime technical documentation](http://lancaster-university.github.io/microbit-docs/ble/uart-service/)
|
||||
For more advanced information on the @boardname@ Bluetooth UART service including information on using a smartphone, see the [Lancaster University @boardname@ runtime technical documentation](http://lancaster-university.github.io/microbit-docs/ble/uart-service/)
|
||||
|
||||
### See also
|
||||
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [micro:bit Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [micro:bit Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on micro:bit resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [@boardname@ Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [@boardname@ Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on @boardname@ resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
|
||||
```package
|
||||
bluetooth
|
||||
|
@ -3,13 +3,13 @@
|
||||
### ~hint
|
||||

|
||||
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the micro:bit has, it must first be [paired with the micro:bit](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the micro:bit and exchange data relating to many of the micro:bit's features.
|
||||
For another device like a smartphone to use any of the Bluetooth "services" which the @boardname@ has, it must first be [paired with the @boardname@](/reference/bluetooth/bluetooth-pairing). Once paired, the other device may connect to the @boardname@ and exchange data relating to many of the @boardname@'s features.
|
||||
|
||||
### ~
|
||||
|
||||
The [Bluetooth UART service](/reference/bluetooth/start-uart-service) allows another device such as a smartphone to exchange any data it wants to with the micro:bit, in small chunks.
|
||||
The [Bluetooth UART service](/reference/bluetooth/start-uart-service) allows another device such as a smartphone to exchange any data it wants to with the @boardname@, in small chunks.
|
||||
|
||||
With the Bluetooth UART service running, this block allows a micro:bit to send data to a Bluetooth connected device.
|
||||
With the Bluetooth UART service running, this block allows a @boardname@ to send data to a Bluetooth connected device.
|
||||
|
||||
```sig
|
||||
bluetooth.uartWriteValue("x", 42);
|
||||
@ -17,11 +17,11 @@ bluetooth.uartWriteValue("x", 42);
|
||||
|
||||
### Advanced
|
||||
|
||||
For more advanced information on the micro:bit Bluetooth UART service including information on using a smartphone, see the [Lancaster University micro:bit runtime technical documentation](http://lancaster-university.github.io/microbit-docs/ble/uart-service/)
|
||||
For more advanced information on the @boardname@ Bluetooth UART service including information on using a smartphone, see the [Lancaster University @boardname@ runtime technical documentation](http://lancaster-university.github.io/microbit-docs/ble/uart-service/)
|
||||
|
||||
### See also
|
||||
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [micro:bit Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [micro:bit Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on micro:bit resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
[About Bluetooth](/reference/bluetooth/about-bluetooth), [@boardname@ Bluetooth profile overview ](http://lancaster-university.github.io/microbit-docs/ble/profile/), [@boardname@ Bluetooth profile reference](http://lancaster-university.github.io/microbit-docs/resources/bluetooth/microbit-profile-V1.9-Level-2.pdf), [Bluetooth on @boardname@ resources](http://bluetooth-mdw.blogspot.co.uk/p/bbc-microbit.html), [Bluetooth SIG](https://www.bluetooth.com)
|
||||
|
||||
```package
|
||||
bluetooth
|
||||
|
Reference in New Issue
Block a user