Bluetooth Button Service

For another device like a smartphone to use any of the Bluetooth “services” which the Calliope mini has, it must first be paired with the Calliope mini. Once paired, the other device may connect to the Calliope mini and exchange data relating to many of the Calliope mini’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 Calliope mini is pressed. Each of the two Calliope mini buttons can be in one of three possible states:

The button service allows you to make other things which are connected to your Calliope mini 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 Calliope mini. We’ll leave it to you to decide what would be amusing.

No additional code is needed on the Calliope mini to use the Bluetooth button service from another device.

bluetooth.startButtonService();

Example: Starting the Bluetooth button service

The following code shows the Bluetooth button service being started:

bluetooth.startButtonService();

Video - Button service demo - Starts at 0:59

Advanced

For more advanced information on the Calliope mini Bluetooth button service including information on using a smartphone, see the Lancaster University Calliope mini runtime technical documentation

See also

About Bluetooth, Calliope mini Bluetooth profile overview , Calliope mini Bluetooth profile reference, Bluetooth on Calliope mini resources, Bluetooth SIG

bluetooth

Edit this page on GitHub