• Thanks, that'd be great.

    Glad it's fixed now - it was remarkably strange behaviour.

    Are you sure your code wasn't something nearer:

    var x=false;
    setInterval(function() {
      x=!x;
      LED1.write(x);
      LED2.write(x);
    }, 20);
    

    In this case, you might expect it to take a few seconds before the lights blink at the right frequency. The internal hardware oscillator takes a few seconds before the frequency stabilises, but your code starts running before that point, so unless you delay, the initial timings can be off by quite a bit.

About

Avatar for Gordon @Gordon started