• Fri 2019.07.26

    Hello @user101989,

    'I suck at bytes and low level stuff, so I am wondering if I understand what I am doing.'

    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

    'but not when I interface with the puck'

    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 -

    recommend changing code first before making a un-solder attempt



    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.

    http://forum.espruino.com/comments/14832­785/

  • 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!

About

Avatar for Robin @Robin started