There are other ways of doing it (like with a connection) but this way is nice and easy and doesn't require any pairing or connection. When using NRF.setAdvertising on the Puck you can choose a low interval (as low as 7.5ms) which would get the latency down, but that will hurt your battery life so you might want to think about having the Puck lower the interval down to 300ms or so after an hour of inactivity.
That's quite nifty! I had gone through the tutorials but totally missed that one!
I saw that it's possible to emit IR from the Puck. Would it be possible for the Pi to listen to IR events and respond accordingly? Would this be faster?
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.
There's some code specifically for Node.js in this tutorial that might help you out: http://www.espruino.com/Puck.js+Advertising
There are other ways of doing it (like with a connection) but this way is nice and easy and doesn't require any pairing or connection. When using
NRF.setAdvertising
on the Puck you can choose a low interval (as low as 7.5ms) which would get the latency down, but that will hurt your battery life so you might want to think about having the Puck lower the interval down to 300ms or so after an hour of inactivity.Hope that helps!