With the firmware 2v16.10 I have a ~50% chance of undefined for Bangle.getPressure(). This is from the IDE:
Bangle.getPressure().then(d=>{ : console.log(d); : // {temperature, pressure, altitude} :}); =Promise: { } { "temperature": 29.57211303710, "pressure": 1008.98850875296, "altitude": 35.54039353922 } Bangle.getPressure().then(d=>{ : console.log(d); : // {temperature, pressure, altitude} :}); =Promise: { } { "temperature": 29.57535298665, "pressure": 1008.98815103067, "altitude": 35.54338200327 } Bangle.getPressure().then(d=>{ : console.log(d); : // {temperature, pressure, altitude} :}); =Promise: { } undefined Bangle.getPressure().then(d=>{ : console.log(d); : // {temperature, pressure, altitude} :}); =Promise: { } { "temperature": 29.61423238118, "pressure": 1008.98636565159, "altitude": 35.55829733279 } Bangle.getPressure().then(d=>{ : console.log(d); : // {temperature, pressure, altitude} :}); =Promise: { } undefined Bangle.getPressure().then(d=>{ : console.log(d); : // {temperature, pressure, altitude} :}); =Promise: { } undefined Bangle.getPressure().then(d=>{ : console.log(d); : // {temperature, pressure, altitude} :}); =Promise: { } undefined Bangle.getPressure().then(d=>{ : console.log(d); : // {temperature, pressure, altitude} :}); =Promise: { } { "temperature": 29.68842061360, "pressure": 1008.98390526754, "altitude": 35.57885179204 }
@user140377 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.
With the firmware 2v16.10 I have a ~50% chance of undefined for Bangle.getPressure(). This is from the IDE: