• I guess it's because you're just running the code once, and also you're trying to output a value between 0 and 1 as an integer?

    What about:

    setInterval(function() {  
      NRF.setAdvertising([
        {0x181A : [Puck.light()*100]}], 
       {interval:500}
      );
    }, 500);
    

    The example code on http://www.espruino.com/Reference#l_NRF_­setAdvertising shows how you could report the temperature using setInterval as well.

About

Avatar for Gordon @Gordon started