Afraid not. The magnetometer event is there because the magnetometer itself can wake the Puck up when something happens, so it makes sense.
For the light and battery it can't, so there's no real benefit in it being built in - you might as well just do: setInterval(function() { myFunction(Puck.light()) }, 10000);
There's also the ability to turn the Puck's NFC on and direct the phone to a URL if you're close enough.
Otherwise you might have to make your own app, and then you can do pretty much anything in response to a button press. DroidScript might help you there.
Do you think it will be possible to control spotify (as an example) on the a phone ?
That'd do volume, tracks, and play/pause - and potentially if you could set Spotify as your default music player, hitting 'play' might auto-start it? Either that or you might be able to find an app that would auto-start spotify based on the Play key being pressed.
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.
Not stupid questions at all :)
Afraid not. The magnetometer event is there because the magnetometer itself can wake the Puck up when something happens, so it makes sense.
For the light and battery it can't, so there's no real benefit in it being built in - you might as well just do:
setInterval(function() { myFunction(Puck.light()) }, 10000);
Yes - you could turn the Puck into a HID keyboard and could then either send key presses you wanted to use to open an app (like 'search', a name, then 'enter), or you could set up a keyboard shortcut with something like: http://www.howtogeek.com/175267/the-htg-guide-to-using-a-bluetooth-keyboard-with-your-android-device/
Info on Puck.js keyboards here: http://www.espruino.com/Puck.js+Keyboard
There's also the ability to turn the Puck's NFC on and direct the phone to a URL if you're close enough.
Otherwise you might have to make your own app, and then you can do pretty much anything in response to a button press. DroidScript might help you there.
Yes - you can use the 'multimedia keys' here: http://www.espruino.com/Puck.js+Keyboard
That'd do volume, tracks, and play/pause - and potentially if you could set Spotify as your default music player, hitting 'play' might auto-start it? Either that or you might be able to find an app that would auto-start spotify based on the Play key being pressed.