Hi,
You should be able to do:
nrf.sendCommand("do_measurement()", function (myValue) { console.log(myValue); });
You need the callback because the value won't be returned immediately - it'll only happen after a fraction of a second...
@Gordon started
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.
Hi,
You should be able to do:
You need the callback because the value won't be returned immediately - it'll only happen after a fraction of a second...