You are reading a single comment by @malaire and its replies.
Click here to read the full conversation.
-
ok, I got I2C error but I don't quite understand this.
try...catch
catches something but still output says that there is uncaught error.Output:
23.60415923008 23.60415923008 OUTER: undefined Uncaught Error: Unhandled promise rejection: Error: I2C Error: Arbitration (start) 23.64360367590 23.64360367590
Code:
setInterval(() => { try { Bangle.getPressure().then(d => { console.log(d.temperature); }).catch(error => { console.log("INNER: " + error); }); } catch (error) { console.log("OUTER: " + error); } }, 10 * 1000);
Could you try putting a
try...catch
around that just in case? It shouldn't be needed but would help to track down where the exception comes from