diff --git a/source/examples/bluetooth-eddystone-uid/main.cpp b/source/examples/bluetooth-eddystone-uid/main.cpp index 2102304..d68d67e 100755 --- a/source/examples/bluetooth-eddystone-uid/main.cpp +++ b/source/examples/bluetooth-eddystone-uid/main.cpp @@ -43,8 +43,8 @@ int main() // Initialise the micro:bit runtime. uBit.init(); - uBit.messageBus.listen(MICROBIT_ID_BUTTON_A, MICROBIT_EVT_ANY, onButtonA); - uBit.messageBus.listen(MICROBIT_ID_BUTTON_B, MICROBIT_EVT_ANY, onButtonB); + uBit.messageBus.listen(MICROBIT_ID_BUTTON_A, MICROBIT_BUTTON_EVT_CLICK, onButtonA); + uBit.messageBus.listen(MICROBIT_ID_BUTTON_B, MICROBIT_BUTTON_EVT_CLICK, onButtonB); startAdvertising(); diff --git a/source/examples/bluetooth-eddystone-url/main.cpp b/source/examples/bluetooth-eddystone-url/main.cpp index 39b0b03..dae29e9 100755 --- a/source/examples/bluetooth-eddystone-url/main.cpp +++ b/source/examples/bluetooth-eddystone-url/main.cpp @@ -42,8 +42,8 @@ int main() // Initialise the micro:bit runtime. uBit.init(); - uBit.messageBus.listen(MICROBIT_ID_BUTTON_A, MICROBIT_EVT_ANY, onButtonA); - uBit.messageBus.listen(MICROBIT_ID_BUTTON_B, MICROBIT_EVT_ANY, onButtonB); + uBit.messageBus.listen(MICROBIT_ID_BUTTON_A, MICROBIT_BUTTON_EVT_CLICK, onButtonA); + uBit.messageBus.listen(MICROBIT_ID_BUTTON_B, MICROBIT_BUTTON_EVT_CLICK, onButtonB); startAdvertising();