d = new DataView(device.data); readings= { temp: (( d.getUint16(18) -32) * 5 / 9).toFixed(1), gravity:(d.getUint16(20)/1000.0).toFixedÂ(3) }; console.log(readings);
{ "temp": "16.7", "gravity": "1.007" }
@Wilberforce 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.
{ "temp": "16.7", "gravity": "1.007" }