• Thanks. Yeah, setTimeout() definitely works with values less than 1 ms, though I'm sure the timing isn't perfect.

    Even if I were to setWatch() before the pulse, wouldn't I still need to do pinMode() after the pulse to set it back to 'input_pullup'? I'm already discarding some of the bits at the beginning (namely, the first two, from the handshake).

    This delay is not the cause of the missing checksum bits, in any event - the missing bits should be at the end, while an incorrect delay would chop off the beginning.

    Oh! I didn't realize you could access the variables from a function defined in setTimeout/setWatch - that makes life a lot easier.

    I'll look into the bitwise operators - they're something I'd never really known existed, since I approach javascript from web development. These aren't used much in web design (for example, W3S doesn't even cover them). This looks so much more graceful than what I was doing.

About

Avatar for DrAzzy @DrAzzy started