Creating a Connected World with the BBC micro:bit and Bluetooth presented by Martin Woolley of Bluetooth SIG Twitter: @bluetooth_mdw
Creating a Connected World
with the BBC micro:bit and Bluetooth
presented by Martin Woolley of Bluetooth SIG Twitter: @bluetooth_mdw
1st WAVE 2nd WAVE 3rd WAVE
2
OVER 3 BILLION BLUETOOTH DEVICES SHIPPED IN 2015
THAT’S OVER 65 MILLION PER WEEK!
7
Internet of Things (IoT)
All manner of things *communicating*
Bluetooth is one of the key
communications technologies of
the IoT
7
Internet of Things (IoT)
Learning to code is essential but not
enough on its own
Creating systems of interacting
computing devices
Coding + Communications is the
sweet spot
7
Bluetooth comes in 2 flavours
Bluetooth BR/EDR
Bluetooth low energy
what can you do with Bluetooth on a micro:bit?
6
Bluetooth Services
7
• Receive accelerometer dataAccelerometer Service
• Receive raw magnetometer or compass bearing dataMagnetometer Service
• Receive notification of button interactionsButton Service
• Read display state. Set patterns and send scrolling text.LED Service
• Communicate event codes bi-directionallyEvent Service
• Receive temperature dataTemperature Service
• Directly control or read from IO pins. Analogue and/or digital. PWM.IO Pin Service
• Exchange arbitrary data UART
connect, monitor, control
8
602 December 2016
Bitty Data Logger
Sensor data from a BBC micro:bit
Bluetooth notifications
http://www.bittysoftware.com
602 December 2016
Bitty Game Controller
Control something
Kitronik Buggy
http://www.bittysoftware.com
602 December 2016
micro:bit Blue
Various demos
Inspiration!
https://github.com/microbit-foundation/microbit-blue
Open Source
broadcast, detect, respond
12
ABI Research predicts the market
for beacons will surpass 500 million shipments per year
by 2020
35
micro:bit museum guide
43
how do you write Bluetooth code for micro:bit?
15
7
concepts
Bluetooth services
connection state tracking
advertising
pairing
7
PXT
The entire PXT code for Bitty Data
Logger is shown on the left
connection state change event
handlers
Bluetooth services
C/C++
7
7
PXT - beacons
EddyStone beacon data format
UID or URL types
Beacon
7
OAQOccasionally Asked Questions
21
602 December 2016
Pairing?
establishes a secure, trusted relationship
between micro:bit and other Bluetooth
device
allows encryption of transmitted data
prevents others from connecting to *your*
micro:bit – anti-bullying
select “Passkey”, “Just Works” or “none”
in software
http://www.bittysoftware.com/videos_how_to.html
602 December 2016
Radio?
micro:bit’s “radio” capability is not Bluetooth
good, simple intro to wireless comms
micro:bit to micro:bit broadcast
uncommon outside the classroom
602 December 2016
micro:bit to micro:bit?
not *directly* with today’s micro:bit
(maybe in V2?)
use smartphone or Pi as hub
http://bluetooth-mdw.blogspot.co.uk/2016/07/microbit-and-bluetooth-roles.html
Bluetooth Peripheral vs Central roles
602 December 2016
only smartphones?
No!
Any “GAP central” Bluetooth device e.g.
smartphone/tablet
Pi 3 or Pi 2 with dongle
PC with dongle
(see http://www.picaxe.com/BBC-microbit/)
602 December 2016
connecting to the internet?
Yes, using a Bluetooth Internet Gateway
Free software for Raspberry Pi available
from bluetooth.com
resources
28
Bitty Software
mobile apps & coding tutorials
http://www.bittysoftware.com
Blog
Experiences and tips
http://bluetooth-mdw.blogspot.co.uk/
microbit.org
http://microbit.org/
Lancaster University
https://lancaster-university.github.io/microbit-docs/
Bluetooth SIG
http://www.bluetooth.com
7
resources
Unthinkably ConnectedUnthinkably Connected71
Twitter: @bluetooth_mdw
questions?
7
Most Important Point:
The advent of the Internet of Things means teaching about communications technologies like Bluetooth is as
essential as teaching about coding itself.
What to do:
Use the BBC micro:bit and its Bluetooth capabilities in lessons and code clubs with applications like those
from bittysoftware.com