One additional piece of info. I tested this while connected bluetooth to my mac, everything worked without error. This only occurs when puck is connected to raspberry pi.
I also used a much simpler code
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});
got the exact same error.
there is something wrong with ble_hid_keyboard on the raspberry pi.
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.
One additional piece of info. I tested this while connected bluetooth to my mac, everything worked without error. This only occurs when puck is connected to raspberry pi.
I also used a much simpler code
got the exact same error.
there is something wrong with ble_hid_keyboard on the raspberry pi.