You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • The continuous connection power usage is something I'll try and fix at some point. Basically you have a choice of transmission speed or power usage - when programming Puck.js I need it to go as fast as possible, so it needs to draw quite a bit of power. However I could add an option to set the Puck up so that the connection was very slow, but power efficient, and then you could stay connected for long periods without problems.

    Making Puck do the connection to other devices is a bit more complex for it, but it handles it just fine - and it's not like it uses a bunch of power. The only gotcha is making sure that bleno works on the computer you're trying to connect to.

    With advertising, Puck.js advertises normally. You could make it go to sleep properly when not pressed and it'd really increase the battery life past the 1 year quoted, but I wouldn't worry too much. Often it's nice for your computer to be able to know that the Puck is in range but not pressed.

    One other option is to make the Puck a HID button, and then put it to sleep when not pressed. If you're confident that the Mac will autoconnect whenever it sees it, that could work pretty well. Once pressed, the button will wake up, the Mac will autoconnect, and once connected the button could transmit a button press.

  • Thanks for explaining this so clearly, I really appreciate the time you take to answer questions and help solve issues!

    I'll have to evaluate the alternatives here, they all sound doable. Although BLE is far from simple, I actually like the flexibility it provides, makes it possible to optimise for each use case.

    Would be nice to be able to enable slow but power efficient continuous connections, especially for long-running sensors transmitting small chunks of data. But I'm perfectly fine with any of the other options for my button if they do the trick :)

About

Avatar for Gordon @Gordon started