-
-
@Gordon Is there a way for the button to trigger a reconnect? To save battery, I want to turn bluetooth off until I click it a certain way to turn in back on. Figure this would introduce issues reconnecting.
-
Hey, I have a system here that doesn't seem to work with the Espruino IDE. The application opens, I see a black screen. The contents of somehow interactable though. There's also and odd static sound that plays. It's a Windows 10 machine. Works fine on my main computer though.
Any ideas? Logs I can check? Already turned off hardware acceleration in Chrome just in case.
-
-
Hi,
I've been having some issues with my puck(s). Often, when I joined them to Bluetooth, they'll automatically go back to "Paired" rather than "Connected". Sometimes, when they connect, they don't appear as HID device either.
Any ideas?
Here's the snippet where I define the NRF services:
var services = { 0x180a: { 0x2a50: { value: [ 0x01, 0x6d, 0x04, 0x2b, 0xc5, 0x00, 0x00 ], readable: true, } } }; var kb = require("ble_hid_keyboard"); NRF.setServices(services, { advertise: [ 0x180a ], hid : kb.report });
Thanks
-
-
So... here's what I ended up doing (and it works, with no errors!)
NRF.sendHIDReport([kb.MODIFY.GUI|kb.MODIFY.SHIFT,0,kb.KEY.F11,0,0,0,0,0], function() { setTimeout(function() { NRF.sendHIDReport([0,0,0,0,0,0,0,0], function() { console.log("keys sent"); }); }, 550); });
550 seems to be a good spot for a delay in "ending" the HID report. Different software pick up keyboard actions at different intervals, I guess, so this was good for my specific use case. If the delay is too long, it'll trigger it x many times.
-
The first snippet is something I've already tried - doesn't work consistently. Like my prior attempts, it works "sometimes" - double clicking /usually/ does the proper thing, but not always.
The second snippet has the same results.
My "broken" snippet is the only one that works consistently. (but causes an error, funny enough - try/catching the error makes it break again).
Here's some context for what exactly I'm doing:
I'm setting up a recording kiosk room thing. I have Open Broadcaster Studio running with some obscure hotkey to Record/Stop that won't trigger anything else (it's now WIN+SHIFT+F11 ... WIN+F12 was the save function in PPT), as I need it to always run in the background.
Puck.js is great because it can sit wirelessly on a lectern and do everything they need to do without having to touch the mouse/kb of the computer. I've programmed different actions for length of click, double click, clicks with no light, etc...
-
So...this (despite causing an an error) "works" for my intended purposes. This is the only thing I've been able to do that makes it work "properly".
NRF.sendHIDReport([kb.MODIFY.GUI,0,kb.KEY.F12,0,0,0,0,0], function() { }); NRF.sendHIDReport([kb.MODIFY.GUI,0,kb.KEY.F12,0,0,0,0,0], function() { NRF.sendHIDReport([0,0,0,0,0,0,0,0], function() { console.log("keys sent"); }); });
Error:
Uncaught Error: BLE HID already sending at line 138 col 8 }); ^ in function "triggerCommand" called from line 96 col 88 ...eld': held, 'light': light}); ^ in function called from system
Have any suggestions on how to improve this so it's not technically broken? lol
-
Windows 10, latest puck.js firmware as of yesterday.
It seemed pretty reliable with the a/A examples. Assumingly, for a "press and hold", would I do something like:
NRF.sendHIDReport([kb.MODIFY.GUI,0,0,0,0,0,0,0], function() { NRF.sendHIDReport([kb.MODIFY.GUI,0,kb.KEY.F12,0,0,0,0,0], function() { NRF.sendHIDReport([0,0,0,0,0,0,0,0], function() { console.log("keys sent"); }); }); });
-
I'm not sure what's going on - the code on the puck is executing fine, getting all my correct debug output and callbacks for kb.tap;
however, the computer is not always detecting the taps properly. I have it currently sending like this:
kb.tap(kb.KEY.F12, kb.MODIFY.GUI, function() { console.log("keys sent"); });
Intending to trigger Win+F12 - it does trigger the hotkey on the computer SOMETIMES. I have to press the button a lot to get it. If I do it myself on a keyboard, no problems - intended application catches the hot key. Not so much on the puck.
Any ideas?
-
-
Gotcha. With future releases I should expect the battery life to be longer than around a month? That's the lifespan I'm seeing right now. Not doing much except BLE HID connection and waiting for button press.