You are reading a single comment by @Robin and its replies.
Click here to read the full conversation.
-
Thanks for your input I will next time do all this checklist you suggest because it all makes sense to try, specially the analyzer and decoder thing. !!!
I figured it out by bruteforcing trial and error attempts. In the end I had to change the 1 in line 8 for a 0. Doing that did the trick. I have no clue why!
Fri 2019.07.26
Hello @user101989,
It appears you understand your situation accurately!! wink, wink
But seriously now, would you please post the output, that is generated from the code segment above, from the left-hand side of the WebIDE so that we may get an idea of what 'i am getting a senseless value' actually means to us.
So far nothing stands out. Code segment appears okay.
Puck flashed to latest firmware? What ver please.
process.env
Is there a common ground between the two devices? How was the sensor grounded on your Arduino setup? If the sensor is floating, might explain the erroneous values.
Any chance you could post an image of the wiring and the schematic link to see if there is a I2C setup or wiring issue? e.g. sda scl backwards -
Do you have access to a logic analyzer and protocol decoder? I highly recommend (eventually~$20USD) getting one. Has saved me multiple times. See this image I recently posted.