• It looks like there is a minor typo for the tutorial http://www.espruino.com/Pixl.js+Wireless­+Temperature+Display

    in this line:

    g.drawString(`${dev.name}: ${d.getUint8(0)}'C (${d.getUint8(0)}% bat)`,0,idx*6);
    

    the battery level is displayed twice...

    looks like that should reference a different element & read:

          g.drawString(`${dev.name}: ${d.getUint8(1)}'C (${d.getUint8(0)}% bat)`,0,idx*6);
    
    

    Also, in this same tutorial, I notice that making a slight adaptation to the puck code:

    		console.log("temperature: ", E.getTemperature());
    

    gives a decimal temperature, e.g. "24.5",

    yet the Pixl.js only displays the integer part with this

    ${d.getUint8(1)}'C
    

    any hints for how to extract the entire decimal part?

About

Avatar for cottjr @cottjr started