It might work - you could definitely give it a try. However you may fall foul of Puck.js's relatively limited IR transmission range (which is only maybe 1M - depending on how good the receiver is).
Another option might be to use a red laser (and lasers are obviously cooler anyway) and then point the reflection back at the Puck's red LED (which is what is used for measuring light).
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.
It might work - you could definitely give it a try. However you may fall foul of Puck.js's relatively limited IR transmission range (which is only maybe 1M - depending on how good the receiver is).
Another option might be to use a red laser (and lasers are obviously cooler anyway) and then point the reflection back at the Puck's red LED (which is what is used for measuring light).
Or... you could cheat and use something like: http://www.espruino.com/Pyroelectric
They'd need another source of power but they are pretty efficient so would run for a while on a battery.