• Luckily Espruino's a bit more memory efficient than MicroPython ;)

    I forgot to include the BLE API in the online reference. I've just updated it - the stuff you want is here.

    At the moment the support is limited to advertising data (ideally you'd be able to set proper GATT information), but it should be perfect for what you want.

    For example the following reports the current temperature:

    setInterval(function() {
      NRF.setAdvertising({
        0x1809 : [0|E.getTemperature()]
      });
    }, 30000);
    

    The UUID given should be one of the standard bluetooth ones at the moment.

    It's still a bit limited (it seems you can't send much advertising data at the moment before it runs out of memory, and I'm not sure why).

About

Avatar for Gordon @Gordon started