I can see the data is changing when I send something to the device but is there a function I can call to update the value only after the data is change? and not print it once every 1000mSec (like I did)?
There's nothing built in (often you may want to be able to send the same number twice). But it's easy enough for you to add code like if (value!=lastValue) ....
BLE Connected, queueing BLE restart for later
No, this is fine. It just means that Espruino can't change the advertised services when you're connected to it. The second you disconnect it'll change them and all will be fine
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.
Great, this looks good!
There's nothing built in (often you may want to be able to send the same number twice). But it's easy enough for you to add code like
if (value!=lastValue) ...
.No, this is fine. It just means that Espruino can't change the advertised services when you're connected to it. The second you disconnect it'll change them and all will be fine