I'm expecting a different output.... #643
Replies: 5 comments
-
Posted at 2016-11-09 by @gfwilliams I don't really understand - so you're saying that the Isn't |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-11-09 by d0773d Oh crap, ya its coming from console.log(a + " " + c); I forgot to comment that out. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-11-09 by d0773d I'm getting undefined for resTempVal and undefined outputs before console.log(resTempVal); So, i'm assuming there's a small delay while taking the sensor reading and the variable resTempVal isn't set. Is there a way to wait until resTempVal gets set before I continue? code:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-11-09 by @gfwilliams As you say, your problem is that This is classic JS though. You need to use a callback function:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-11-09 by d0773d @gordon. That did the trick. Thanks |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2016-11-09 by d0773d
I'm trying to receive a value from my temp sensor. Expect I'm receiving "77 r" (without quotes). I should be receiving a number value.
code:
Beta Was this translation helpful? Give feedback.
All reactions