For investigating in the other HID project I tried to get a MDBT42Q set up as a BLE keyboard or volume control using this example from here
Strangely, it didn't work.
Here is my final code (mostly copied, but wrapped in an onInit() so it gets called after PowerUp):
onInit()
function onInit() { var kb = require("ble_hid_keyboard"); NRF.setServices(undefined, { hid : kb.report }); function btnPressed() { // Send 'a' kb.tap(kb.KEY.A, 0, function() { // Followed by capital 'A' kb.tap(kb.KEY.A, kb.MODIFY.SHIFT); }); } // trigger btnPressed whenever the button is pressed setWatch(btnPressed, BTN, {edge:"rising",repeat:true,debounce:50}); }
Could someone try and confirm my results please? I tried both examples: The one with the keyboard and the one with the volumeUp control. None worked.
volumeUp
Some more findings:
volumeUp()
Is this expected behaviour or a bug?
Thanks in advance.
@ChristianW started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
For investigating in the other HID project I tried to get a MDBT42Q set up as a BLE keyboard or volume control using this example from here
Strangely, it didn't work.
Here is my final code (mostly copied, but wrapped in an
onInit()
so it gets called after PowerUp):Could someone try and confirm my results please?
I tried both examples: The one with the keyboard and the one with the
volumeUp
control.None worked.
Some more findings:
volumeUp()
) my phone (iOS) shows a confirmation dialog.Is this expected behaviour or a bug?
Thanks in advance.