Amazing, thanks! I have expertise on JS and Ajax but not on promises, however I'm good at "understanding" or may I call reverse engineering given a working script.
Looking at the Espruino reference I already suspected the 'function' command was the one to use, but I needed some advice.
In fact button detection is not really needed, only the ability to send a text to the website. The button press will happen at the watch and the js at the web can interpret it. I thought " Bluetooth.println(JSON.stringify({t:"info", msg:"Hello"})); " might work, but no.
I am testing at my own server as you pointed out. I appreciate the help.
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.
Amazing, thanks! I have expertise on JS and Ajax but not on promises, however I'm good at "understanding" or may I call reverse engineering given a working script.
Looking at the Espruino reference I already suspected the 'function' command was the one to use, but I needed some advice.
In fact button detection is not really needed, only the ability to send a text to the website. The button press will happen at the watch and the js at the web can interpret it. I thought " Bluetooth.println(JSON.stringify({t:"info", msg:"Hello"})); " might work, but no.
I am testing at my own server as you pointed out. I appreciate the help.